阅读背景:

将Windsor Castle注入的依赖关系传递给并行线程 - Dispose()问题

来源:互联网 

I'm using ASP.NET MVC with Castle Windsor as my IoC container with the component lifestyle set to PerWebRequest. My repository (which is the dependency that's injected) creates an instance of Entity Framework's ObjectContext in the constructor and I store that in a private instance variable. My repository implements IDisposable and inside my Dispose method, I dispose the ObjectContext. I think all of this is pretty standard and here's a simplified illustration:I'm using ASP.NET MVC with Castle Windsor as my




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: