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
Post a Comment