
Transactions ensure consistency when multiple changes must succeed or fail together.
Use EF Core's SaveChanges or explicit DbContextTransaction for local transactions.
In distributed systems, consider outbox patterns, sagas, and eventual consistency instead of 2PC.
Architecture impact: Transaction boundaries should align with use cases and aggregate invariants.
Reference:
TaskLoco™ — The Sticky Note GOAT