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].

More from Entity Framework Core Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details