Hi, I encountered a strange problem when using ninject in mvc4 project.
Simply speaking, I want inject multiple IxxxRepository into controller, each IRepository constructed with IUnitOfWork implementation. IUnitOfWork implementation using InThreadScope object scope. But the problem is, everything runs as expected without vs debug, but when using VS debug and hit breakpoint in an Action, seems IxxxRepository's UnitOfWork are different.
Does VS debug will cause Ninject inject different instance into one controller although that object register with InThreadScope?
It strange because it just happened with VS debug mode....Can anybody helps?
Update: InRequestScope has same issue with VS 2012 debug.
Hi, I encountered a strange problem when using ninject in mvc4 project. Simply speaking, I want inject multiple IxxxRepository into controller, each IRepository constructed with IUnitOfWork implementation. IUnitOfWork implementation using InThreadScope object scope. But the problem is, everything runs as expected without vs debug, but when using VS debug and hit breakpoint in an Action, seems IxxxRepository's UnitOfWork are different. Does VS debug will cause Ninject inject different instance into one controller although that object register with InThreadScope? It strange because it just happened with VS debug mode....Can anybody helps? Update: InRequestScope has same issue with VS 2012 debug.