c# - Repository NInject linq exception: different context exception on same context -


i working mvc , repository approach, using ninject inrequestscope(). using ef have 1 edmx file contains tables. testing functions through test project , running fine. when running site (and using ninject) exception:

the specified linq expression contains references queries associated different contexts

i assume because each time call db dbcontext getting created , destroyed right away, ef thinks have 2 different context. how can solve this?


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -