Note

How EF Core Concurrency Tokens Work

A compact note on optimistic concurrency, row versions, and failed updates in EF Core.

dotnetef-coreconcurrency

Short version

An EF Core concurrency token is included in the WHERE clause of an update or delete. If another transaction changed that token first, the affected row count becomes zero and EF Core raises a concurrency exception.

Why it helps

It lets the application detect stale writes without pessimistically locking every read.