Select from following answers:- Call SubmitChanges within a try-catch block. Handle the ChangeConflictException.
- Call InsertOnSubmit within a try-catch block. Handle the ChangeConflictException.
- After calling InsertOnSubmit, verify that the ChangeConflicts collection is empty.
- All Above
By default, SubmitChanges throws a ChangeConflictException if a conflict is detected. You must handle this exception to handle a conflict.
A conflict is not detected until the SubmitChanges method is called. Handling InsertOnSubmit exceptions does not detect a conflict.
The default implementation of SubmitChanges throws a ChangeConflictException if a conflict is detected. Because an exception is thrown in the case of a conflict, code after SubmitChanges does not execute.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator