Share via


RelationalConnection.UseTransaction Method

Definition

Overloads

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.

UseTransaction(DbTransaction, Guid)

Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs

Specifies an existing DbTransaction to be used for database operations.

public virtual Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction, Guid transactionId);
public virtual Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction, Guid transactionId);
abstract member UseTransaction : System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
override this.UseTransaction : System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Overridable 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 IDbContextTransaction that wraps the provided transaction, or null if transaction is null.

Implements

Applies to

UseTransaction(DbTransaction)

Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs
Source:
RelationalConnection.cs

Specifies an existing DbTransaction to be used for database operations.

public virtual Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction);
public virtual Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction);
abstract member UseTransaction : System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
override this.UseTransaction : System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Overridable 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.

Implements

Applies to