Beispiel #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            var container = new CastleWindsorContainer();

            IJobFactory jobFactory = new WindsorJobFactory(container);


            container.RegisterJobs(jobFactory);
            container.Register();

            var controllerFactory = new ControllerFactory(container);

            ControllerBuilder.Current.SetControllerFactory(controllerFactory);
        }