public virtual void OnAppStartup()
 {
     if (AppEnvironment.DebugMode == true)
     {
         using (ToDoLineDbContext dbContext = new ToDoLineDbContext())
         {
             dbContext.Database.Migrate();
         }
     }
 }
Esempio n. 2
0
 public virtual void OnAppStartup()
 {
     if (AppEnvironment.DebugMode == true)
     {
         using (IDependencyResolver dependencyResolver = DependencyManager.CreateChildDependencyResolver())
         {
             ToDoLineDbContext dbContext = dependencyResolver.Resolve <ToDoLineDbContext>();
             dbContext.Database.Migrate();
         }
     }
 }