When multiple users try to update the same record simultaneously
and system is not having the concurrency control, then users can lose their recent
update data, it is called the data concurrency issue and to avoid the this situation, Entity framework is already
provide the Optimistic control to handle the concurrency issue.
There are basically 3 types of concurrency controls:
Thanks for visiting!
Other entity framework releated links :
There are basically 3 types of concurrency controls:
1. Optimistic
Concurrency : Record will be available
for user only read , if it holds by some other user
2. Pessimistic
Concurrency : Record will not be available for user only read , if it holds by some
other user
3. "Last
in wins : None Concurrency
Entity framework is already providing the Optimistic control
to handle the concurrency issue and it provides two types of concurrency modes:
· None – This is the default and means the property is not involved in any concurrency checks
· Fixed – Which means that the original value of this property is sent as part of the WHERE clause in all updates or deletes.
Simply, we will apply the attribute ConcurrencyMode="fixed” to entity property (timestamp property would be best choice) to handle the concurrency issue .Managing Concurrency Mode |
Thanks for visiting!
Other entity framework releated links :
Entity Framework : Bulk Update
No comments:
Post a Comment