Registering IWindsorContainer with ASPNET MVC 2.0 Areas
Posted
by Bernard Larouche
on Stack Overflow
See other posts from Stack Overflow
or by Bernard Larouche
Published on 2010-04-18T22:07:56Z
Indexed on
2010/04/18
22:13 UTC
Read the original article
Hit count: 518
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
© Stack Overflow or respective owner