IRelationalTransactionManager.UseTransaction Method

Definition

Overloads

UseTransaction(DbTransaction)

Specifies an existing DbTransaction to be used for database operations.

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.

public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction);
public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction);
abstract member UseTransaction : System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Function UseTransaction (transaction As DbTransaction) As IDbContextTransaction

Parameters

transaction
DbTransaction

The transaction to be used.

Returns

An instance of IDbTransaction that wraps the provided transaction.

Applies to

UseTransaction(DbTransaction, Guid)

Specifies an existing DbTransaction to be used for database operations.

public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction, Guid transactionId);
public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction, Guid transactionId);
abstract member UseTransaction : System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Function UseTransaction (transaction As DbTransaction, transactionId As Guid) As IDbContextTransaction

Parameters

transaction
DbTransaction

The transaction to be used.

transactionId
Guid

The unique identifier for the transaction.

Returns

An instance of IDbTransaction that wraps the provided transaction.

Applies to