How can I disable change tracking on objects returned from a query? I'm using the new API; most of the google results returned using the Object Scope from the old API, so I couldn't find any documentation...
Thanks.
1 Answer, 1 is accepted
0
Damyan Bogoev
Telerik team
answered on 02 May 2012, 09:42 AM
Hi Brian,
Currently we are working on providing functionality for attaching and detaching persistent capable objects to an OpenAccessContext instance. We will do our best to finish the implementation for the upcoming release.
What you could do to detach persistent object from the context is to deserialize it. This help article shows how to achieve that goal. You need to expose the underlying IObjectScope object. The OpenAccessContextBase class has a method named GetScope, which could be used. You could also extend your domain context with another partial class and add the following property, if it makes it easier to access:
public partial class EntitiesModel
{
public IObjectScope Scope
{
get
{
return this.GetScope();
}
}
}
Hope that helps.
Regards,
Damyan Bogoev
the Telerik team
Follow @OpenAccessORM Twitter channel to get first the latest updates on new releases, tips and tricks and sneak peeks at our product labs!