From d2cf4c4d45ea7d96172130b5ae84487e977f5224 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Mar 2017 09:12:41 -0400 Subject: [PATCH] automatic migrations --- Project-Unite/Global.asax.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Project-Unite/Global.asax.cs b/Project-Unite/Global.asax.cs index 198560c..89b14c2 100644 --- a/Project-Unite/Global.asax.cs +++ b/Project-Unite/Global.asax.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data.Entity.Migrations; using System.IO; using System.Linq; using System.Web; @@ -15,6 +16,9 @@ public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { + var configuration = new Migrations.Configuration(); + var migrator = new DbMigrator(configuration); + migrator.Update(); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes);