Share via


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

Remarks

See EF Core interceptors for more information and examples.

Constructors

DbTransactionInterceptor()

Methods

CreatedSavepoint(DbTransaction, TransactionEventData)

Called immediately after EF creates a transaction savepoint.

CreatedSavepointAsync(DbTransaction, TransactionEventData, CancellationToken)

Called immediately after EF calls CommitAsync(CancellationToken).

CreatingSavepoint(DbTransaction, TransactionEventData, InterceptionResult)

Called just before EF intends to create a transaction savepoint.

CreatingSavepointAsync(DbTransaction, TransactionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to create a transaction savepoint.

ReleasedSavepoint(DbTransaction, TransactionEventData)

Called immediately after EF releases a transaction savepoint.

ReleasedSavepointAsync(DbTransaction, TransactionEventData, CancellationToken)

Called immediately after EF releases a transaction savepoint.

ReleasingSavepoint(DbTransaction, TransactionEventData, InterceptionResult)

Called just before EF intends to release a transaction savepoint.

ReleasingSavepointAsync(DbTransaction, TransactionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to release a transaction savepoint.

RolledBackToSavepoint(DbTransaction, TransactionEventData)

Called immediately after EF rolls back to a transaction savepoint.

RolledBackToSavepointAsync(DbTransaction, TransactionEventData, CancellationToken)

Called immediately after EF rolls back to a transaction savepoint.

RollingBackToSavepoint(DbTransaction, TransactionEventData, InterceptionResult)

Called just before EF intends to roll back to a transaction savepoint.

RollingBackToSavepointAsync(DbTransaction, TransactionEventData, InterceptionResult, CancellationToken)

Called just before EF intends to roll back to a transaction savepoint.

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 RelationalDatabaseFacadeExtensions.UseTransaction is called.

TransactionUsedAsync(DbConnection, TransactionEventData, DbTransaction, CancellationToken)

Called immediately after RelationalDatabaseFacadeExtensions.UseTransactionAsync is called.

Applies to