Ninject & Entity Framework =(sometimes) "The ObjectContext instance has been disposed ..."
- by n26
I am using Ninject and ADO.Net Entity Framework in my Aps.Net (Mvc) website. I bind the ObjectContext to Ninject using the RequestScope:
Bind<Entities>().ToSelf().InRequestScope().WithConstructorArgument("connectionString", _connectionString);
In most cases this works perferct. But sometimes I got the following error:
The ObjectContext…