示例#1
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     Database.SetInitializer(new MigrateDatabaseToLatestVersion <DataContext, Configuration>());
     AutofacConfig.SetAutofacContainer();
     AutoMapperConfig.RegisterMapper();
 }
示例#2
0
        protected void Application_Start()
        {
            AutofacConfig.SetAutofacContainer();//初始化依赖注入
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            Database.SetInitializer(new MigrateDatabaseToLatestVersion <DataContext, Configuration>());

            AutoMapperConfig.RegisterMapper();

            CustomRaiseEventConfig.ReisgerEvent();
        }