What is the best way to execute all required db migrations at application start with EF 4.3?
The best way should be using new MigrateDatabaseToLatestVersion initializer.
MigrateDatabaseToLatestVersion
Database.SetInitializer<YourContext>( new MigrateDatabaseToLatestVersion<YourContext, YourMigrationsConfig>()); Database.Initialize(false);
1.4m articles
1.4m replys
5 comments
57.0k users