protected void Application_Start() { Container = new WindsorContainer(); BootStrapper.Initialize(Container); ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(Container)); AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
private static void InitializeContainer(IMVCContainer container) { DataAccessBootStrapper.Initialize(container); container.Register<IUserService, UserService>(); container.Register<IOfferService, OfferService>(); container.Register<IPropertyService, PropertyService>(); container.Register<IAuthentication, FormsAuthentication>(); container.Register<ISessionManager, SessionManager>(); container.Register<PurpleBricksDemo.Web.Models.Sessions.ISessionStorage, SessionStorage>(); container.Register<ISecurityService, Pbkdf2>(); container.Register(Types.FromThisAssembly().BasedOn(typeof(Controller)).WithService.Self().LifestyleTransient()); }
public WindsorControllerFactory(IMVCContainer container) { _container = container; }
public static void Initialize(IMVCContainer container) { InitializeContainer(container); }