Пример #1
0
        protected void Application_Start()
        {
            AppLoader.InitializeApp(Server.MapPath("."));

            Database.SetInitializer(new DropCreateDatabaseIfModelChanges <Repository>());

            using (var db = Repository.Create())
                db.Database.Initialize(force: true);
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }