You are implementing an application that uses Entity Framework-generated entities to update a data source. You add a method that retrieves a Product entity, modifies it, and then calls the ObjectContext's SaveChanges method. You configure the Entity Data Model to check for concurrency before updating the data source. You need to log the error if the data source cannot be updated because the concurrency check fails.

What should you do?

 Posted by Rajkatie on 9/27/2012 | Category: ADO.NET Interview questions | Views: 2648 | Points: 40
Select from following answers:
  1. Add code to handle the OptimisticConcurrencyException exception. Log the error in this exception handler.
  2. Log the error if the SaveChanges method returns 0.
  3. Log the error if the SaveChanges method returns a value greater than 0.
  4. All Above

Show Correct Answer


Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response