Interface IPersistenceSessionFactory
- Namespace
- MailFathom.Application.Persistence
- Assembly
- MailFathom.Application.dll
Creates explicit persistence sessions for local write operations that span multiple stores.
public interface IPersistenceSessionFactory
Remarks
EF Core opens a transaction only through the Database facade of a concrete DbContext, which
Application must not see, so the seam has no published interface to take.
ADR 0001
chose an explicit session over an ambient one, and this contract is what keeps the transaction boundary visible in
the signature of the write that spans it rather than hidden in asynchronous flow state.
Methods
- BeginSessionAsync(CancellationToken)
Begins a short-lived provider-neutral session for one local synchronization write batch.