Table of Contents

Interface IPersistenceSession

Namespace
MailFathom.Application.Persistence
Assembly
MailFathom.Application.dll

Represents a short-lived application-owned persistence session shared by repositories that participate in one local transaction.

public interface IPersistenceSession : IAsyncDisposable
Inherited Members

Remarks

The session is declared here rather than taken from EF Core's IDbContextTransaction because that type would appear in the signature of every use case that writes, and because this contract carries behavior the provider's does not: a commit reports an optimistic concurrency conflict as a result its caller loops on, which is the lower of the two altitudes ADR 0001 signals a conflict at.

Methods

CommitAsync(CancellationToken)

Attempts to commit all repository writes joined to this session.