concept modify entity in category .net

appears as: modified entity
Entity Framework 4 in Action

This is an excerpt from Manning's book Entity Framework 4 in Action.

The second solution for updating an object is pretty simple, even if it’s slightly more complex than the one based on ChangeObjectState. For this second solution, you query the database to retrieve the entity you want to modify, and then you use the ApplyCurrentValues method to apply the values from the modified entity. Finally, you invoke SaveChanges. When the modifications are persisted, the most optimized SQL is generated because the state manager knows which properties have been modified. Here’s the code for such a solution.