How can we do pessimistic locking in Entity Framework?

Technology CommunityCategory: Entity FrameworkHow can we do pessimistic locking in Entity Framework?
VietMX Staff asked 3 years ago

We cannot do pessimistic locking using Entity Framework. You can invoke a stored procedure from Entity Framework and do pessimistic locking by setting the isolation level in the stored procedure. But directly, Entity Framework does not support pessimistic locking.