using System.Web.Http; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; namespace Andi.MVC.Core.Infrastructure.IOC { public class WebApiControllerInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) { container.Register( Classes.FromAssemblyNamed("Andi.MVC.Web") .BasedOn() .ConfigureFor(x => x.LifestyleScoped())); } } }