Locking a database row in entity framework

.net c# entity-framework

Question

I am using Entity framework 3.5

I need to edit a database row, and I want to ensure that no other process edits this row once I start editing it.

How do I achieve this in Entity Framework 3.5?

I am looking to lock a specific row, not an entire table.

1
3
9/4/2012 7:06:00 AM

Popular Answer

This can be achieved by implementing pessimistic concurrency.

Have a look at this tutorial to learn more about concurrency in EF. There are also some tutorials on the same website about how to implement different methods for handling concurrency.

Hope this helps!

2
9/4/2012 6:54:29 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow