filmov
tv
Part 18 Handling ChangeConflictException
Показать описание
Text version of the video
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.
Slides
LINQ to SQL Tutorial - All Text Articles & Slides
LINQ to SQL Tutorial Playlist
Dot Net, SQL, Angular, JavaScript, jQuery and Bootstrap complete courses
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.
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.
Slides
LINQ to SQL Tutorial - All Text Articles & Slides
LINQ to SQL Tutorial Playlist
Dot Net, SQL, Angular, JavaScript, jQuery and Bootstrap complete courses
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.
Комментарии