Which method should you call before persisting changes?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.
Theapplication uses the ADO.NET Entity Framework to model persistence-ignorant entities. The
applicationoperates in a disconnected mode. You need to ensure that changes made to local entities
while the application is in the disconnected mode are correctly persisted. Which method should you
call before persisting changes?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.
Theapplication uses the ADO.NET Entity Framework to model persistence-ignorant entities. The
applicationoperates in a disconnected mode. You need to ensure that changes made to local entities
while the application is in the disconnected mode are correctly persisted. Which method should you
call before persisting changes?

A.
ObjectStateEntry.SetModifiedProperty

B.
DataContext.AcceptAllChanges

C.
ObjectStateEntry.AcceptChanges

D.
ObjectContext.Refresh

Explanation:
ObjectStateEntry.SetModifiedProperty(string propertyName) Method Marks the specified property
as modified.



Leave a Reply 0

Your email address will not be published. Required fields are marked *