Share via


IRelationalTransactionManager Interface

Definition

Creates and manages the current transaction for a relational database.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IRelationalTransactionManager : Microsoft.EntityFrameworkCore.Storage.IDbContextTransactionManager
type IRelationalTransactionManager = interface
    interface IDbContextTransactionManager
type IRelationalTransactionManager = interface
    interface IDbContextTransactionManager
    interface IResettableService
Public Interface IRelationalTransactionManager
Implements IDbContextTransactionManager
Derived
Implements

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Implementation of database providers and extensions for more information and examples.

Properties

CurrentTransaction

Gets the current transaction.

(Inherited from IDbContextTransactionManager)

Methods

BeginTransaction()

Begins a new transaction.

(Inherited from IDbContextTransactionManager)
BeginTransaction(IsolationLevel)

Begins a new transaction.

BeginTransactionAsync(CancellationToken)

Asynchronously begins a new transaction.

(Inherited from IDbContextTransactionManager)
BeginTransactionAsync(IsolationLevel, CancellationToken)

Asynchronously begins a new transaction.

CommitTransaction()

Commits all changes made to the database in the current transaction.

(Inherited from IDbContextTransactionManager)
CommitTransactionAsync(CancellationToken)

Commits all changes made to the database in the current transaction.

(Inherited from IDbContextTransactionManager)
ResetState()

Resets the service so that it can be used from the pool.

(Inherited from IResettableService)
ResetStateAsync(CancellationToken)

Resets the service so that it can be used from the pool.

(Inherited from IResettableService)
RollbackTransaction()

Discards all changes made to the database in the current transaction.

(Inherited from IDbContextTransactionManager)
RollbackTransactionAsync(CancellationToken)

Discards all changes made to the database in the current transaction.

(Inherited from IDbContextTransactionManager)
UseTransaction(DbTransaction, Guid)

Specifies an existing DbTransaction to be used for database operations.

UseTransaction(DbTransaction)

Specifies an existing DbTransaction to be used for database operations.

UseTransactionAsync(DbTransaction, CancellationToken)

Specifies an existing DbTransaction to be used for database operations.

UseTransactionAsync(DbTransaction, Guid, CancellationToken)

Specifies an existing DbTransaction to be used for database operations.

Applies to