I understand how to make optimistic concurrency work with Entity Framework for a single table.
But what about the scenario where I want to have optimistic concurrency across multiple tables. To illustrate what I mean, I will use an example:
- Car table
- Wheel table, foreign key to Car (multiple wheels per car)
How can I manage concurrency in the case where the ser adds/removes a Wheel from the Car.
Adding a ModifiedTimestamp column in the Car can handle concurrent updates to Car, but what about udpates to the Car's Wheel?
I can only imagine solving this by using pessimistic concurrency (ie - locking the car object to a user) to solve this. But from my research, it seems that pessmistic concurrency is not supported by Entity Framework.
This is just a very simple example, and I'm wondering how everyone solves this type of scenario in general. I can imagine there are many situations where you have an entity, which has related entites, and should all be considered as one in terms of concurrent updates.