protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); StaticDataContext.Directory = HostingEnvironment.MapPath("~/files"); StaticDataContext.Load(); if (StaticDataContext.BookGivings.Count == 0) { StaticDataContext.CreateTestingData(); StaticDataContext.Save(); } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); StaticDataContext.Directory = HostingEnvironment.MapPath("~/files"); if (File.Exists(StaticDataContext.FilePath)) { StaticDataContext.Load(); } else { StaticDataContext.CreateTestingData(); } //StaticDataContext.CreateTestingData(); }