What are the error reporting options during concurrency conflicts?

 Posted by ArticlesMaint on 9/30/2009 | Category: LINQ Interview questions | Views: 2959


LINQ concurrency system lets you specify how you want the conflicts to be reported. LINQ system has given 2 ways to report conflicts:-

ContinueOnConflict :- This option says to the LINQ engine that continue even if there are conflicts and finally return all conflicts at the end of the process.

FailOnFirstConflict :- This option says stop as soon as the first conflict occurs and return all the conflicts at that moment. In other words LINQ engine does not continue ahead executing the code.
 



Both these options can be provided as a input in ‘SubmitChanges’ method using the ‘ConflictMode’ enum. Below is the code snippet of how to specify conflict modes.
 

objContext.SubmitChanges(ConflictMode.ContinueOnConflict);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response