Should I maintain a Timestamp property
on my Model classes for enable optimistic concurrency for data update and delete ? If I won't use such a attribute,whether EF will give concurrency exception at run time or not ?
Is this must for enable the concurrency handling ?
[Timestamp]
public byte[] RowVersion { get; set; }
Yes, either that or you decorate a property with [ConcurencyCheck]
. Otherwise you will end up with scenario last write wins.
EDIT:
Official tutorial on how to handle Concurrency:
Handling Concurrency with the Entity Framework in an ASP.NET MVC Application
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With