Turn Off Change Tracking in New API

Thread is closed for posting
2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 27 Apr 2012 Link to this post


    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...

  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 02 May 2012 Link to this post

    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
                return this.GetScope();

    Hope that helps.

    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!
Back to Top