コード例 #1
0
        protected void Application_Start()
        {
            // Database.SetInitializer(new DropCreateDatabaseIfModelChanges<OjsDbContext>());
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <OjsDbContext, DefaultMigrationConfiguration>());
            EfBulkInsertGlimpseProviderRegistry.Execute();

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ViewEngineConfig.RegisterViewEngines(ViewEngines.Engines);
        }
コード例 #2
0
        protected void Application_Start()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <OjsDbContext, DefaultMigrationConfiguration>());
            EfBulkInsertGlimpseProviderRegistry.Execute();

            FilterConfig.RegisterGlobalFilters(
                GlobalFilters.Filters,
                new object[] { new ActionFilterDispatcher(SimpleInjectorConfig.Container.GetAllInstances) });
            ObjectFactory.InitializeServiceProvider(SimpleInjectorConfig.Container);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ViewEngineConfig.RegisterViewEngines(ViewEngines.Engines);
            HangfireBootstrapper.Instance.Start();
        }