How to block editing of a record when it is being edited by another user C #

2

On a networked system (several using the same database), how do I know if a user is already editing the registry. For if in the case two computers edit the same record at the same time, a problem occurs because only the changes of the last user that edited will be saved.

    
asked by anonymous 10.02.2015 / 23:07

1 answer

2

If you are using the Entity Framework, use Data Annotation [ConcurrencyCheck], the context itself will help you treat your competition, check link . Check also the link passed in the @QMechanic73 comment, link

    
11.02.2015 / 12:15