Beispiel #1
0
        protected void Application_Start()
        {
            var container = new WindsorContainer();

            container
            .InstallControllers()
            .InstallDal();

            var castleControllerFactory = new CastleControllerFactory(container);

            // Добавляем фабрику контроллеров для обработки запросов
            ControllerBuilder.Current.SetControllerFactory(castleControllerFactory);
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }