EF has no support for this. If you want to block some record on request, you should do something like:
using (var scope = new TransactionScope(...)) { using (var context = new YourContext(...)) { var customer = context.ExecuteStoreQuery<Customer>("SELECT ... FROM Customers WITH (UPDLOCK) WHERE ...");
Or context.Database.SqlQuery in the case of the DbContext API.
Ladislav Mrnka
source share