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

            WindsorBootstrapper.Initialize(container);
            GlobalConfiguration.Configure(WebApiConfig.Register);
            GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator),
                                                               new WindsorCompositionRoot(WindsorBootstrapper.Container));
        }
示例#2
0
 protected void Application_Start()
 {
     WindsorBootstrapper.Initialize();
     AreaRegistration.RegisterAllAreas();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator),
                                                        new WindsorCompositionRoot(WindsorBootstrapper.Container));
 }
示例#3
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            var container = new WindsorContainer();

            WindsorBootstrapper.Initialize(container);

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
        protected void Application_Start()
        {
            WindsorBootstrapper.Initialize();
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);

            GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator),
                                                               new WindsorCompositionRoot(WindsorBootstrapper.Container));
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            //Database.SetInitializer<StudentManagementContext>(null);
        }
示例#5
0
        protected void Application_Start()
        {
            WindsorBootstrapper.Initialize();

            // Configurate WebApi
            GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerActivator),
                                                               new WindsorCompositionRoot(WindsorBootstrapper.Container));
            GlobalConfiguration.Configuration.DependencyResolver = new WindsorDependencyResolver(WindsorBootstrapper.Container);
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            Logger.Info("=====Application Start at:{0}=====", DateTime.Now);
        }