DbTransactionInterceptor Class

Definition

Abstract base class for IDbTransactionInterceptor for use when implementing a subset of the interface methods.

public abstract class DbTransactionInterceptor : Microsoft.EntityFrameworkCore.Diagnostics.IDbTransactionInterceptor, Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor
type DbTransactionInterceptor = class
    interface IDbTransactionInterceptor
    interface IInterceptor
Public MustInherit Class DbTransactionInterceptor
Implements IDbTransactionInterceptor, IInterceptor
Inheritance
DbTransactionInterceptor
Implements

Constructors

DbTransactionInterceptor()

Methods

TransactionCommitted(DbTransaction, TransactionEndEventData)

Called immediately after EF calls Commit().

TransactionCommittedAsync(DbTransaction, TransactionEndEventData, CancellationToken)

Called immediately after EF calls CommitAsync(CancellationToken).

TransactionCommitting(DbTransaction, TransactionEventData, InterceptionResult)

Called just before EF intends to call Commit().

TransactionCommittingAsync(DbTransaction, TransactionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to call CommitAsync(CancellationToken).

TransactionFailed(DbTransaction, TransactionErrorEventData)

Called when use of a DbTransaction has failed with an exception. />.

TransactionFailedAsync(DbTransaction, TransactionErrorEventData, CancellationToken)

Called when use of a DbTransaction has failed with an exception. />.

TransactionRolledBack(DbTransaction, TransactionEndEventData)

Called immediately after EF calls Rollback().

TransactionRolledBackAsync(DbTransaction, TransactionEndEventData, CancellationToken)

Called immediately after EF calls RollbackAsync(CancellationToken).

TransactionRollingBack(DbTransaction, TransactionEventData, InterceptionResult)

Called just before EF intends to call Rollback().

TransactionRollingBackAsync(DbTransaction, TransactionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to call RollbackAsync(CancellationToken).

TransactionStarted(DbConnection, TransactionEndEventData, DbTransaction)

Called immediately after EF calls BeginTransaction(IsolationLevel).

This method is still called if an interceptor suppressed creation in TransactionStarting(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>). In this case, result is the result returned by TransactionStarting(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>).

TransactionStartedAsync(DbConnection, TransactionEndEventData, DbTransaction, CancellationToken)

Called immediately after EF calls BeginTransactionAsync(IsolationLevel, CancellationToken).

This method is still called if an interceptor suppressed creation in TransactionStarting(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>). In this case, result is the result returned by TransactionStarting(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>).

TransactionStarting(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>)

Called just before EF intends to call BeginTransaction(IsolationLevel).

TransactionStartingAsync(DbConnection, TransactionStartingEventData, InterceptionResult<DbTransaction>, CancellationToken)

Called just before EF intends to call BeginTransactionAsync(IsolationLevel, CancellationToken).

TransactionUsed(DbConnection, TransactionEventData, DbTransaction)

Called immediately after UseTransaction(DatabaseFacade, DbTransaction) is called.

TransactionUsedAsync(DbConnection, TransactionEventData, DbTransaction, CancellationToken)

Called immediately after UseTransactionAsync(DatabaseFacade, DbTransaction, CancellationToken) is called.

Applies to