예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
        }