IRelationalTransactionManager IRelationalTransactionManager Interface

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.

Syntax

Declaration

public interface IRelationalTransactionManager : IDbContextTransactionManagerPublic Interface IRelationalTransactionManager
    Inherits IDbContextTransactionManager

Inherited Members

BeginTransaction(),
BeginTransaction(),
BeginTransactionAsync(CancellationToken),
BeginTransactionAsync(CancellationToken),
CommitTransaction(),
CommitTransaction(),
RollbackTransaction(),
RollbackTransaction(),
CurrentTransaction
CurrentTransaction

Methods summary

Begins a new transaction.

Asynchronously begins a new transaction.

Specifies an existing System.Data.Common.DbTransaction to be used for database operations.

Methods

  • BeginTransaction(IsolationLevel)
    BeginTransaction(IsolationLevel)

    Begins a new transaction.

    IDbContextTransaction BeginTransaction(IsolationLevel isolationLevel)Function BeginTransaction(isolationLevel As IsolationLevel) As IDbContextTransaction

    Parameters

    • isolationLevel
      System.Data.IsolationLevel
      System.Data.IsolationLevel

      The isolation level to use for the transaction.

    Returns

  • BeginTransactionAsync(IsolationLevel, CancellationToken)
    BeginTransactionAsync(IsolationLevel, CancellationToken)

    Asynchronously begins a new transaction.

    Task<IDbContextTransaction> BeginTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken = null)Function BeginTransactionAsync(isolationLevel As IsolationLevel, cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

    Parameters

    • isolationLevel
      System.Data.IsolationLevel
      System.Data.IsolationLevel

      The isolation level to use for the transaction.

    • cancellationToken
      System.Threading.CancellationToken
      System.Threading.CancellationToken

      A System.Threading.CancellationToken to observe while waiting for the task to complete.

    Returns

    • System.Threading.Tasks.Task<TResult><IDbContextTransaction>
      System.Threading.Tasks.Task<TResult>(Of IDbContextTransaction)

      A task that represents the asynchronous operation. The task result contains the newly created transaction.

  • UseTransaction(DbTransaction)
    UseTransaction(DbTransaction)

    Specifies an existing System.Data.Common.DbTransaction to be used for database operations.

    IDbContextTransaction UseTransaction(DbTransaction transaction)Function UseTransaction(transaction As DbTransaction) As IDbContextTransaction

    Parameters

    • transaction
      System.Data.Common.DbTransaction
      System.Data.Common.DbTransaction

      The transaction to be used.

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll