Unit of Work
A persistence pattern that tracks a set of changes and coordinates their write operations as one logical transaction boundary.
Software Engineering Context
Unit of Work tracks a set of changes and coordinates their persistence as one logical transaction. ORM persistence contexts commonly implement this behavior by accumulating entity changes before flushing them to the database.
Design Boundary
Unit of Work does not provide automatic atomicity across independent distributed services. Crossing a process or transactional-resource boundary can require patterns such as Saga, Outbox, or an explicit distributed transaction.