Exemple #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Exemple #2
0
        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);
        }