依赖注入(IOC)容器初始化
示例#1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            LogConfig.Initialize();
            ILogger logger = LogManager.GetLogger(typeof(MvcApplication));

            logger.Debug("网站启动");
            CastleConfig.Initialize();
            logger.Debug("依赖注入初始化完成");
            DatabaseConfig.Initialize();
            logger.Debug("数据库初始化完成");
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }