handle-optimistic-concurrency

Installation
SKILL.md

Handle Optimistic Concurrency in ABP

ABP's concurrency check uses optimistic concurrency control: users can attempt to update the same record without being blocked up front. When one update wins, the others are rejected because the record has changed underneath them and must be re-read before retrying.

When to Use

  • You need to detect and reject concurrent updates to the same record instead of silently overwriting.
  • You want to enable concurrency control on an entity via IHasConcurrencyStamp / ConcurrencyStamp.
  • You want concurrency for free by deriving from an aggregate root base class.
  • You need to flow the stamp from the read DTO back through the update DTO so a stale client is rejected.
  • You need to handle or surface AbpDbConcurrencyException.

When Not to Use

  • EF-Core-specific mapping or change tracking — use ef-core-integration.
  • MongoDB provider setup — use mongodb-integration (this skill only notes provider-specific stamp behavior).
  • Unit-of-work flush / transaction control — use manage-units-of-work.
  • General validation and user-facing error handling — use handle-validation-and-errors.
Installs
22
GitHub Stars
32
First Seen
Sep 5, 2026