manage-units-of-work

Installation
SKILL.md

Manage ABP Units of Work

ABP's Unit of Work (UOW) controls the database connection and transaction scope. Once a UOW starts it creates an ambient scope: every database operation done inside it participates in one boundary and is committed on success or rolled back on exception, all together.

When to Use

  • Starting a UOW outside the conventions (background jobs, console apps, an inner scope) with IUnitOfWorkManager.Begin.
  • Enabling/disabling a UOW or its transaction on a method/class with [UnitOfWork].
  • Choosing transactional vs non-transactional boundaries, or changing the global default.
  • Flushing pending changes mid-scope with SaveChangesAsync (e.g. to read an auto-increment id).
  • Running nested/RequiresNew/reserved scopes, or hooking OnCompleted.

When Not to Use

  • Defining a DbContext, repositories, or EF Core migrations — use the ef-core-integration skill.
  • MongoDB DbContext / repositories — use mongodb-integration.
  • Soft-delete / multi-tenant / custom query filters — use apply-data-filters.
  • Optimistic concurrency stamps — use handle-optimistic-concurrency.
  • Connection-string resolution/configuration — use configure-connection-strings.
Installs
27
GitHub Stars
32
First Seen
Aug 15, 2026