nerdexam
Microsoft

70-516 · Question #129

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 entities. The application allows users to…

The correct answer is A. Set the ObjectTrackingEnabled property of DataContext to true. ObjectTrackingEnabled Instructs the framework to track the original value and object identity for this DataContext. ObjectTrackingEnabled Property us/library/system.data.linq.datacontext.objecttrackingenabled.aspx)

Manipulating and Validating Data

Question

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 entities. The application allows users to make changes while disconnected from the data store. Changes are submitted to the data store by using the SubmitChanges method of the DataContext object. You receive an exception when you call the SubmitChanges method to submit entities that a user has changed in offline mode. You need to ensure that entities changed in offline mode can be successfully updated in the data store. What should you do?

Options

  • ASet the ObjectTrackingEnabled property of DataContext to true.
  • BSet the DeferredLoadingEnabled property of DataContext to true.
  • CCall the SaveChanges method of DataContext with a value of false.
  • DCall the SubmitChanges method of DataContext with a value of

How the community answered

(46 responses)
  • A
    74% (34)
  • B
    4% (2)
  • C
    9% (4)
  • D
    13% (6)

Explanation

ObjectTrackingEnabled Instructs the framework to track the original value and object identity for this DataContext. ObjectTrackingEnabled Property us/library/system.data.linq.datacontext.objecttrackingenabled.aspx)

Topics

#LINQ to SQL#DataContext#ObjectTrackingEnabled#offline changes

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice