How to tell if data isdirty?

Thread is closed for posting
2 posts, 0 answers
  1. kieron
    kieron avatar
    9 posts
    Member since:
    Dec 2010

    Posted 17 Oct 2011 Link to this post

    Hi I am having an issue trying to figure out how to tell if data is dirty.using the example in the manual creating a new instance of openaccesscontext

    SofiaCarRentalDbContext dbContext = new SofiaCarRentalDbContext();
    To save changes i would use dbcontext.savechanges()

    But after making changes to the dbcontext how can i tell if the dbcontext is dirty? ie when closing a winform check if any changes have been made. i found some info in web on objectcontainer.isdirty but i cant find a way to get form dbcontext to that.

  2. Serge
    Serge avatar
    375 posts

    Posted 20 Oct 2011 Link to this post

    Hello Kieron,

     You use the GetChanges API to see whether there are any pending changes in the context. Have a look at this help article for more information on the topic. 

    I hope this is helpful, do let us know if you face further trouble.

    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

Back to Top