Sample Download :
CS Version: http://code.msdn.microsoft.com/How-to-undo-the-changes-in-00aed3c4
VB Version: http://code.msdn.microsoft.com/How-to-undo-the-changes-in-1ee89ae3
This sample demonstrates how to undo the changes in Entity Framework.
When we make the changes to the entities, we can use the SaveChanges Method to update the entities in the database. But sometimes some of the changes are wrong, and we need to rollback these changes. In this sample, we demonstrate how to use ObjectContext and DbContext to undo the changes in different levels.
1. Context Level;
2. Entity Set Level;
3. Entity Level;
4. Property Level.
You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.