How to: Detect Changes in POCO Entities
This topic shows how to track changes in POCO entities by using a change-tracking proxies. It also shows how to detect changes without proxies, by calling the DetectChanges method. Note, that by default the SaveChanges method will first call the DetectChanges method. For more information, see Tracking Changes in POCO Entities.
The examples in this topic use the POCO classes that are defined in How to: Define POCO Entities and an AdventureWorks-based data model that is defined in How to: Customize Modeling and Mapping Files to Work with Custom Objects.
This example adds a POCO self-tracking proxy, which allows the Entity Framework to track changes in the POCO entity.