protected void Application_Start()
{
#if DEBUG
Database.SetInitializer(new DropCreateDatabaseIfModelChanges<DbCtx>());
#endif
}
That way, given that that the models have changed, when I am running the application in debug mode, the database will be dropped and recreated.
How do you DropCreateDatabaseIfModelChanges if database is currently in use?
ReplyDelete