PrepAway - Latest Free Exam Questions & Answers

Which method should you call before persisting changes?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application uses the ADO.NET Entity Framework to model persistence-ignorant entities. The application operates 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?

PrepAway - Latest Free Exam Questions & Answers

A.
ObjectContext.Refresh

B.
DataContext.AcceptAllChanges

C.
ObjectStateEntry.AcceptChanges

D.
ObjectStateEntry.SetModifiedProperty

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


Leave a Reply