RelationalDatabaseFacadeExtensions.UseTransaction Método

Definição

Sobrecargas

UseTransaction(DatabaseFacade, DbTransaction)

Define o DbTransaction a ser usado por operações de banco de dados no DbContext.

UseTransaction(DatabaseFacade, DbTransaction, Guid)

Define o DbTransaction a ser usado por operações de banco de dados no DbContext.

UseTransaction(DatabaseFacade, DbTransaction)

Define o DbTransaction a ser usado por operações de banco de dados no DbContext.

public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction);
public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction);
static member UseTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function UseTransaction (databaseFacade As DatabaseFacade, transaction As DbTransaction) As IDbContextTransaction

Parâmetros

databaseFacade
DatabaseFacade

O DatabaseFacade para o contexto.

transaction
DbTransaction

O DbTransaction a ser usado.

Retornos

Um IDbContextTransaction que encapsula a transação fornecida.

Comentários

Consulte Transações no EF Core para obter mais informações e exemplos.

Aplica-se a

UseTransaction(DatabaseFacade, DbTransaction, Guid)

Define o DbTransaction a ser usado por operações de banco de dados no DbContext.

public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction, Guid transactionId);
public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction, Guid transactionId);
static member UseTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function UseTransaction (databaseFacade As DatabaseFacade, transaction As DbTransaction, transactionId As Guid) As IDbContextTransaction

Parâmetros

databaseFacade
DatabaseFacade

O DatabaseFacade para o contexto.

transaction
DbTransaction

O DbTransaction a ser usado.

transactionId
Guid

O identificador exclusivo para a transação.

Retornos

Um IDbContextTransaction que encapsula a transação fornecida.

Comentários

Consulte Transações no EF Core para obter mais informações e exemplos.

Aplica-se a