Entity Framework 6 Migrations: How to disable automatic Update-Database on Database initialize? -
we have project running ef6 , have activated migrations. problem have ha lot of data needs added database when created. worked until needed add data in migration part part becomes part of sql script. because when try , create new database on our development machines migration steps done before initializer's seed method , of data in migration step depends on seed data.
is there way initial database, without migrations, plus initializer's seed data? or need move critical data initialcreate mirgations method?
the production database cannot wiped @ stage , need add new production data migration step.
edit: in end moved effected data method in migrations, not way wanted short on time , solved problem.
migrations have seed method can override takes place after up() method. can use addorupdate command in case data may exist. http://www.asp.net/web-api/overview/data/using-web-api-with-entity-framework/part-3
Comments
Post a Comment