Is there a method of manually clearing/resetting an ObjectContext back to its initial state? Note that I can't just instantiate a new context.
This is using the 1.0 version of the Entity Framework.
Thanks
Is there a method of manually clearing/resetting an ObjectContext back to its initial state? Note that I can't just instantiate a new context.
This is using the 1.0 version of the Entity Framework.
Thanks
ObjectContext is meant to be a short-lived object, it shouldn't be cached like that. Normal usage should look like:
using(var ctx = new MyContext())
{
// Select/update/insert/delete
ctx.SaveChanges();
}