How can we handle concurrency in Entity Framework?

Technology CommunityCategory: Entity FrameworkHow can we handle concurrency in Entity Framework?
VietMX Staff asked 3 years ago

In EF, concurrency issue is resolved by using optimistic locking. To implement optimistic locking, right click on the EDMX designer and set the concurrency mode to Fixed. Now whenever we have concurrency issues you should get an OptimisticConcurrencyException error.