Locking a table with a select in Entity Framework

Posted by Manuel Felício on Stack Overflow See other posts from Stack Overflow or by Manuel Felício
Published on 2009-10-26T16:31:45Z Indexed on 2010/04/06 22:03 UTC
Read the original article Hit count: 357

I need to be able to do

select * from myTable with (xlock,holdlock)

from Entity Framework. Is this possible? I've opened a TransactionScope with the Serializable isolation level but my selects are not locking the tables. I'd like them to lock until I complete the transaction scope.

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about transactionscope