IDbContextTransactionManager IDbContextTransactionManager Interface

Definition

Creates and manages the current transaction.

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

public interface IDbContextTransactionManager
Public Interface IDbContextTransactionManager

Properties

CurrentTransaction CurrentTransaction

Gets the current transaction.

IDbContextTransaction CurrentTransaction { get; }
ReadOnly Property CurrentTransaction As IDbContextTransaction

Methods

BeginTransaction() BeginTransaction()

Begins a new transaction.

IDbContextTransaction BeginTransaction()
Function BeginTransaction As IDbContextTransaction
Returns

The newly created transaction.

BeginTransactionAsync(CancellationToken) BeginTransactionAsync(CancellationToken)

Asynchronously begins a new transaction.

Task<IDbContextTransaction> BeginTransactionAsync(CancellationToken cancellationToken = null)
Function BeginTransactionAsync(cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)
Parameters
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.

void CommitTransaction()
Sub CommitTransaction

RollbackTransaction() RollbackTransaction()

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

void RollbackTransaction()
Sub RollbackTransaction