How to: Detect Changes in POCO Entities

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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.

Example

This example adds a POCO self-tracking proxy, which allows the Entity Framework to track changes in the POCO entity.

This example adds a POCO entity that is not tracked by the ObjectContext. The DetectChanges method is called to synchronize the ObjectStateManager with the current state of the objects.

See Also

Show: