Junior
From PDF
EF Core
Entity Framework Core
How is concurrency handled? What is optimistic concurrency vs pessimistic concurrency?
- Optimistic concurrency: Assumes that conflicts are rare. EF checks for changes
before saving using concurrency tokens.
- Pessimistic concurrency: Locks records in the DB to prevent other updates (not
supported out-of-the-box in EF Core).
EF Core supports optimistic concurrency using [ConcurrencyCheck] or
[Timestamp].
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png