You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.You
use the ADO.NET Entity Framework to model your entities.You use Plain Old CLR Obects (POCO)
entities along with snapshot-based change tracking. The code accesses the POCO ent,es direcly. You
need to ensure that the state manager synchronizes when changes are made to the object graph.
Which ObectContext method should you choose?
A.
Refresh
B.
SaveChanges
C.
DetectChanges
D.
ApplyPropertyChanges
Explanation:
When working with POCO, you must call the DetectChanges method on the ObjectContext to attach
the POCO entity to the ObjectContext. Be sure to call DetectChanges prior to calling SaveChanges.
ApplyPropertyChanges Obsolete. Applies property changes from a detached object to an object
already attached to the object context.
CHAPTER 6 ADO.NET Entity Framework
Lesson 2: Querying and Updating with the Entity Framework
Attaching Entities to an ObjectContext (page 438)