Text version of the video
http://csharp-video-tutorials.blogspo...
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
/ @aarvikitchen5572
Slides
http://csharp-video-tutorials.blogspo...
LINQ to SQL Tutorial - All Text Articles & Slides
http://csharp-video-tutorials.blogspo...
LINQ to SQL Tutorial Playlist
• LINQ to SQL Tutorial
Dot Net, SQL, Angular, JavaScript, jQuery and Bootstrap complete courses
https://www.youtube.com/user/kudvenka...
This is continuation to Part 17. Please watch Part 17 before proceeding. In this video we will discuss how to handle ChangeConflictException.
There are 3 options available to handle ChangeConflictException. RefreshMode enum values define how to handle optimistic concurrency conflicts. This enum has 3 values
KeepCurrentValues - Keeps all the current changes made by the current user in the DataContext object. SubmitChanges() method will save all changes made by the current user, overwriting any changes made by other users after the data was loaded by the current user.
KeepChanges - Keeps the current values that have been changed, but updates the other values with the database values. SubmitChanges() method will save any changes made by the current user and will preserve any changes made by other users. If another user changed the same value as the current user, the current user's change will overwrite it.
OverwriteCurrentValues - Updates the DataContext with the current database values, which means that all changes made by the current user will be discarded.