RelationalDatabaseFacadeExtensions.UseTransaction Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
UseTransaction(DatabaseFacade, DbTransaction) |
Imposta l'oggetto DbTransaction da utilizzare dalle operazioni del database in DbContext. |
UseTransaction(DatabaseFacade, DbTransaction, Guid) |
Imposta l'oggetto DbTransaction da utilizzare dalle operazioni del database in DbContext. |
UseTransaction(DatabaseFacade, DbTransaction)
Imposta l'oggetto DbTransaction da utilizzare dalle operazioni del database in 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
Parametri
- databaseFacade
- DatabaseFacade
Oggetto DatabaseFacade per il contesto.
- transaction
- DbTransaction
Oggetto DbTransaction da usare.
Restituisce
Oggetto IDbContextTransaction che incapsula la transazione specificata.
Commenti
Per altre informazioni ed esempi , vedere Transazioni in EF Core .
Si applica a
UseTransaction(DatabaseFacade, DbTransaction, Guid)
Imposta l'oggetto DbTransaction da utilizzare dalle operazioni del database in 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
Parametri
- databaseFacade
- DatabaseFacade
Oggetto DatabaseFacade per il contesto.
- transaction
- DbTransaction
Oggetto DbTransaction da usare.
- transactionId
- Guid
Identificatore univoco per la transazione.
Restituisce
Oggetto IDbContextTransaction che incapsula la transazione specificata.
Commenti
Per altre informazioni ed esempi , vedere Transazioni in EF Core .