Linq ChangeConflictException (ASP.NET MVC) - occurs when submitting DataContext changes

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-03-26T23:06:02Z Indexed on 2010/03/26 23:13 UTC
Read the original article Hit count: 292

Filed under:
|

System.Data.Linq.ChangeConflictException: 2 of X updates failed. at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) at PROJECT.Controllers.HomeController.ClickProc(Int32 id, String code, String n)

This is what I get very often. This action is done thousands of times a day, and I get this exception about once every 5 seconds. From what I understand it happens when something changes in the database in the period between creating DataContext and updating it. Am I right?

What's the problem here and how can I fix it?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about linq-to-sql