IRelationalTransactionManager.UseTransactionAsync Metodo

Definizione

Overload

UseTransactionAsync(DbTransaction, CancellationToken)

Specifica un oggetto esistente DbTransaction da usare per le operazioni di database.

UseTransactionAsync(DbTransaction, Guid, CancellationToken)

Specifica un oggetto esistente DbTransaction da usare per le operazioni di database.

UseTransactionAsync(DbTransaction, CancellationToken)

Specifica un oggetto esistente DbTransaction da usare per le operazioni di database.

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> UseTransactionAsync (System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction?> UseTransactionAsync (System.Data.Common.DbTransaction? transaction, System.Threading.CancellationToken cancellationToken = default);
abstract member UseTransactionAsync : System.Data.Common.DbTransaction * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
Public Function UseTransactionAsync (transaction As DbTransaction, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

Parametri

transaction
DbTransaction

Transazione da usare.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Restituisce

Istanza di IDbTransaction che esegue il wrapping della transazione specificata.

Eccezioni

Si applica a

UseTransactionAsync(DbTransaction, Guid, CancellationToken)

Specifica un oggetto esistente DbTransaction da usare per le operazioni di database.

public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> UseTransactionAsync (System.Data.Common.DbTransaction transaction, Guid transactionId, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction?> UseTransactionAsync (System.Data.Common.DbTransaction? transaction, Guid transactionId, System.Threading.CancellationToken cancellationToken = default);
abstract member UseTransactionAsync : System.Data.Common.DbTransaction * Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
Public Function UseTransactionAsync (transaction As DbTransaction, transactionId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

Parametri

transaction
DbTransaction

Transazione da usare.

transactionId
Guid

Identificatore univoco per la transazione.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Restituisce

Istanza di IDbTransaction che esegue il wrapping della transazione specificata.

Eccezioni

Si applica a