views:

62

answers:

1

Is this possible to implement with EF4.0? I have used NHibernate in the past and you can flag a timestamp column as a 'Version' column and it will enforce concurrency.

Does this feature exist for EF4.0? If it does, are there any resources on how to set this up? If it does not exist, what alternatives do I have to handle 2 users editing the same instance of an object at the same time?

+4  A: 

EF handles concurrency all right with the optimistic model (no record blocking ahead, checking field values haven't been touched when updating) in a property by property basis. Check for example http://blogs.u2u.be/diederik/post/2010/05/30/Optimistic-concurrency-using-a-SQL-Timestamp-in-Entity-Framework-40.aspx

Edgar Sánchez
This is exactly what I was looking for. Thanks.
Brandon