Registering IWindsorContainer with ASPNET MVC 2.0 Areas
- by Bernard Larouche
I had the following code that was working well before the addition of Areas in MVC 2 :
protected override IWindsorContainer CreateContainer(string windsorConfig)
{
IWindsorContainer container = new WindsorContainer();
container.Register(Component.For<IUnitOfWorkFactory>()
.ImplementedBy<NHibernateUnitOfWorkFactory>());
container.Register(AllTypes.Of<IController>()
.FromAssembly(typeof(HomeController).Assembly)
.Configure(t => t.Named(t.Implementation.Name.ToUpper())
.LifeStyle.Is(LifestyleType.Transient)));
return container;
}
It doesn't work anymore with MVC 2.0 Areas feature.
Could you guide me through a possible solution
Thanks