You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Framework to model entities. You write the following code segment. (Line numbers are included for reference only.)
01AdventureWorksEntities context = New AdventureWorksEntities (http://localhost:1234/AdventureWorks.svc );
02
03var q = from c in context.Customers
04where c.City == “London”
05orderby c.CompanyName
06select c;
You need to ensure that the application meets the following requirements: “Compares the current values of unmodified properties with values returned from the data source. “Marks the property as modified when the properties are not the same. Which code segment should you insert at line 02?
A.
context.MergeOption = MergeOption.AppendOnly;
B.
context.MergeOption = MergeOption.PreserveChanges;
C.
context.MergeOption = MergeOption.OverwriteChanges;
D.
context.MergeOption = MergeOption.NoTracking;