阅读背景:

Ninject, DbContext & Windows Service - New Instance Each Time Thread Runs?

来源:互联网 

I'm current writing a Windows Service which connects to an existing service layer using Entity Framework (DbContext), and Ninject to inject the Respositories and DbContext instance. This is pretty much working with one caveat - I want a brand new DbContext instance each time the thread runs, whereas at the moment I'm getting the same one for the entire thread lifetime.I'm current writing a Windows Service which con




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

分享到: