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

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -