protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); var sessionFactory = NHibernateConfiguration.CreateFactory(); ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(sessionFactory)); ModelBinders.Binders.Add(typeof(Cart), new CartModelBinder()); }