Optimistic Concurrency Structure Exception

Should I support the Timestamp property in my Model classes to enable optimistic concurrency for updating and deleting data? If I do not use such an attribute, will EF throw a concurrency exception at runtime or not?

Is it necessary to enable concurrency processing?

 [Timestamp] public byte[] RowVersion { get; set; } 
+7
concurrency entity-framework
source share
1 answer

Yes, either that or you decorate the property with [ConcurencyCheck] . Otherwise, you will end the script of the last recording attempts.

EDIT:

Official Concurrency Guide:

Concurrency Processing with Entity Framework in ASP.NET MVC Application

+10
source share

All Articles