cake-contrib / Cake.EntityFramework

A set of Cake aliases for Entity Framework code first migrations.
https://cakebuild.net/extensions/cake-entityframework
MIT License
5 stars 5 forks source link

[WIP] Adding RunSeedMethod Function #27

Closed PaigeM89 closed 7 years ago

PaigeM89 commented 7 years ago

Initial idea for allowing seed methods to be run explicitly. #26

Based on how EF is set up, we have to run a migration in order for the seed method to get fired off. I figured sending in the current migration is probably the safest way to do this.

Questions:

  1. Any concerns about this method in general? There is a risk of crashing if the current migration is empty - which could only happen if there are no migrations on the database.
  2. Any ideas on the best way to test this? I'm not sure what exactly would need to be tested, based on how this was implemented.
codecov-io commented 7 years ago

Codecov Report

Merging #27 into develop will decrease coverage by 1.47%. The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #27      +/-   ##
===========================================
- Coverage    69.69%   68.22%   -1.48%     
===========================================
  Files            9        9              
  Lines          231      236       +5     
  Branches        31       31              
===========================================
  Hits           161      161              
- Misses          60       65       +5     
  Partials        10       10
Impacted Files Coverage Δ
src/Cake.EntityFramework/Migrator/EfMigrator.cs 64.93% <0%> (-1.74%) :arrow_down:
...Cake.EntityFramework/Migrator/EfMigratorBackend.cs 76.05% <0%> (-3.36%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a104a59...4dabc64. Read the comment docs.