You use two DataContext instances to retrieve objects from two database tables. After modifying the returned objects, you call the SubmitChanges method on each instance of DataContext. You want changes to both databases to occur in the context of a single distributed transaction.

What should you do?

 Posted by Rajkatie on 9/30/2012 | Category: ADO.NET Interview questions | Views: 2655 | Points: 40
Select from following answers:
  1. Embed calls to the SubmitChanges method within a TransactionScope with TransactionScopeOption set to RequiresNew. Call Complete after the updates.
  2. Embed calls to the DataContext.GetTable<T> methods within a TransactionScope. Call Complete after the tables are retrieved.
  3. Call the BeginTransaction and Commit methods on the Connection property of each DataContext.
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response