Class SqlInboxTransactionScope
Relational implementation of the opaque IInboxTransactionScope, wrapping the active BCL IDbTransaction whose transaction enlists an inbox handler's own writes together with the processed-mark.
public sealed class SqlInboxTransactionScope : IInboxTransactionScope
- Inheritance
-
SqlInboxTransactionScope
- Implements
- Inherited Members
- Extension Methods
Remarks
The relational inbox providers (SqlServer, Postgres) drive an exactly-once
IScopedTransactionalInboxStore over a single local IDbTransaction. Because the
underlying handle is the BCL IDbTransaction — not a provider-native type — a single shared
scope and a single AsSqlTransaction() accessor serve every relational provider (unlike the
per-provider MongoDB/Cosmos scopes, whose handles have no BCL equivalent).
Constructors
SqlInboxTransactionScope(IDbTransaction)
Initializes a new instance of the SqlInboxTransactionScope class.
public SqlInboxTransactionScope(IDbTransaction transaction)
Parameters
transactionIDbTransactionThe active local database transaction the handler's writes should enlist in.
Exceptions
- ArgumentNullException
Thrown when
transactionis null.
Properties
Transaction
Gets the active local database transaction. Handler writes issued on
Connection and passed transaction: this commit atomically with the
processed-mark.
public IDbTransaction Transaction { get; }