This is a migrated thread and some comments may be shown as answers.

How to tell if data isdirty?

1 Answer 91 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kieron
Top achievements
Rank 1
kieron asked on 18 Oct 2011, 02:11 AM
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.

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 20 Oct 2011, 03:50 PM
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.

Greetings,
Serge
the Telerik team

NEW and UPDATED OpenAccess ORM Resources. Check them out!

Tags
Getting Started
Asked by
kieron
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or