Action Filter Dependency Injection in ASP.NET MVC 3 RC2 with StructureMap

前端 未结 3 2475
广开言路
广开言路 2021-02-20 11:09

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

3条回答
  •  名媛妹妹
    2021-02-20 11:22

    Did you implement your own IDependencyResolver that uses StructureMap? It seems like you must not have, because you set the session to be HttpContext scoped and yet you are seeing separate sessions during the same request.

提交回复
热议问题