protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); SongContext db = new SongContext(); db.Database.Initialize(false); db.SaveChanges(); db.Dispose(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }