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);
2.1m questions
2.1m answers
60 comments
57.0k users