IRelationalTransactionManager 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 : IDbContextTransactionManager
Public Interface IRelationalTransactionManager
    Inherits IDbContextTransactionManager

Methods

BeginTransaction() BeginTransaction()

Begins a new transaction.

(Inherited from IDbContextTransactionManager)

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

The newly created transaction.

BeginTransactionAsync(CancellationToken) BeginTransactionAsync(CancellationToken)

Asynchronously begins a new transaction.

(Inherited from IDbContextTransactionManager)

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<IDbContextTransaction> System.Threading.Tasks.Task(Of IDbContextTransaction)

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

CommitTransaction() CommitTransaction()

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

(Inherited from IDbContextTransactionManager)

RollbackTransaction() RollbackTransaction()

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

(Inherited from IDbContextTransactionManager)

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

An instance of System.Data.IDbTransaction that wraps the provided transaction.

Properties

CurrentTransaction CurrentTransaction

Gets the current transaction.

(Inherited from IDbContextTransactionManager)