c# - Entity Framework: Using multiple Strategies -
is possible use multiple strategies database setinitializer
in ef 6.1.2 ?
i want use createdatabaseifnotexists
, seed add initialisation data , want use dbmigrationsconfiguration
on same dbcontext migration purpose. how use in same dbcontext setinitializer
?
reason doing coded migration
have use
database.setinitializer( new migratedatabasetolatestversion<yourcontext, configuration>());
also,
database.setinitializer(new dmdbinitializer());
where dmdbinitializer : createdatabaseifnotexists<dmdbcontext>
Comments
Post a Comment