Compartir a través de


RelationalDatabaseFacadeExtensions.UseTransactionAsync Método

Definición

Sobrecargas

UseTransactionAsync(DatabaseFacade, DbTransaction, CancellationToken)

Establece el objeto DbTransaction que se va a usar en las operaciones de base de datos en .DbContext

UseTransactionAsync(DatabaseFacade, DbTransaction, Guid, CancellationToken)

Establece el objeto DbTransaction que se va a usar en las operaciones de base de datos en .DbContext

UseTransactionAsync(DatabaseFacade, DbTransaction, CancellationToken)

Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs

Establece el objeto DbTransaction que se va a usar en las operaciones de base de datos en .DbContext

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

Parámetros

databaseFacade
DatabaseFacade

para DatabaseFacade el contexto.

transaction
DbTransaction

Objeto DbTransaction que se va a usar.

cancellationToken
CancellationToken

que CancellationToken se va a observar mientras espera a que se complete la tarea.

Devoluciones

que Task contiene para IDbContextTransaction la transacción especificada.

Excepciones

Comentarios

Consulte Transacciones en EF Core para obtener más información y ejemplos.

Se aplica a

UseTransactionAsync(DatabaseFacade, DbTransaction, Guid, CancellationToken)

Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs

Establece el objeto DbTransaction que se va a usar en las operaciones de base de datos en .DbContext

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

Parámetros

databaseFacade
DatabaseFacade

para DatabaseFacade el contexto.

transaction
DbTransaction

Objeto DbTransaction que se va a usar.

transactionId
Guid

Identificador único de la transacción.

cancellationToken
CancellationToken

que CancellationToken se va a observar mientras espera a que se complete la tarea.

Devoluciones

que Task contiene para IDbContextTransaction la transacción especificada.

Excepciones

Comentarios

Consulte Transacciones en EF Core para obtener más información y ejemplos.

Se aplica a