You are implementing ASP.NET Web service methods named GetEmployees and UpdateEmployees. GetEmployees uses LINQ to SQL to return an employees result set. UpdateEmployees updates the database with changes made to the employees result set.

In UpdateEmployees, you create a DataContext. You must add code to associate the modified result set with this DataContext instance and submit changes to the database. Your solution should use a minimum of developer effort.

What should you do?

 Posted by Rajkatie on 9/9/2012 | Category: ADO.NET Interview questions | Views: 2963 | Points: 40
Select from following answers:
  1. Call the Attach method of the collection associated with the Employee table. Call SubmitChanges.
  2. Add all results programmatically using InsertOnSubmit and call SubmitChanges with ContinueOnConflict.
  3. Execute the same query used to create the result set. Reconcile the result sets programmatically and call SubmitChanges.
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response