nerdexam
Microsoft

70-516 · Question #145

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

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

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework. You create the following Entity Data Model. You add the following code fragment: using(var context = new AdventureWorksLTEntities()) { Customer cust = context.Customers.First(); cust.CompanyName = "Contoso"; int count = 0; } The changes to the cust entity must be saved. If an exception is thrown, the application will attempt to save up to 3 times. If not, an exception is thrown. Which code segment should you use?

Options

  • Awhile(count++ < 3)
  • Bwhile(cust.EntityState == EntityState.Modified)
  • Cwhile(true)
  • Dwhile(context.ObjextStateManager.GetObjectStateEntry(cust).

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