Action Filter Dependency Injection in ASP.NET MVC 3 RC2 with StructureMap
- by Ben
Hi,
I've been playing with the DI support in ASP.NET MVC RC2.
I have implemented session per request for NHibernate and need to inject ISession into my "Unit of work" action filter.
If I reference the StructureMap container directly (ObjectFactory.GetInstance) or use DependencyResolver to get my session instance, everything works fine:
…