protected void Application_Start(object sender, EventArgs e) { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); Logger.Configure(); if (ServerPath == null) { ServerPath = Server.MapPath("~"); } var appdataFolder = Server.MapPath("~/App_Data/"); EfConfig.Initialize(appdataFolder); ModelUtility.SetRootFolder(ServerPath, "ModelsRoot"); }
/// <summary> /// This method will be called after migrating to the latest version. /// </summary> /// <param name="context"></param> protected override void Seed(EntityContext context) { EfConfig.AddOrUpdateData(context, _appdataFolder); }