nerdexam
Microsoft

70-516 · Question #206

70-516 Question #206: Real Exam Question with Answer & Explanation

Sign in or unlock 70-516 to reveal the answer and full explanation for question #206. The question stem and answer options stay visible for context.

Question

You develop a Microsoft .NET application that uses Entity Framework to store entities in a Microsft SQL Server 2008 database. While the application is disconnected from the database, entities that are modified, are serialized to a local file. The next time the application connects to the database, it retrieves the identity from the database by using an object context named context and stores the entity in a variable named remoteCustomer. The application then serializes the Customer entity from the local file and stores the entity in a variable named localCustomer. The remoteCustomer and the localCustomer variables have the same entity key. You need to ensure that the offline changes to the Customer entity is persisted in the database when the ObjectContext.SaveChanges() method is called. Which line of code should you use?

Options

  • Acontext.ApplyOriginalValues("Customers", remoteCustomer);
  • Bcontext.ApplyOriginalValues("Customers", localCustomer);
  • Ccontext.ApplyCurrentValues("Customers", remoteCustomer);
  • Dcontext.ApplyCurrentValues("Customers", localCustomer);

Unlock 70-516 to see the answer

You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-516 Practice