共用方式為


RelationalDatabaseFacadeExtensions.UseTransaction 方法

定義

多載

UseTransaction(DatabaseFacade, DbTransaction)

DbTransaction設定 上資料庫作業 DbContext 要使用的 。

UseTransaction(DatabaseFacade, DbTransaction, Guid)

DbTransaction設定 上資料庫作業 DbContext 要使用的 。

UseTransaction(DatabaseFacade, DbTransaction)

來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs

DbTransaction設定 上資料庫作業 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

參數

databaseFacade
DatabaseFacade

DatabaseFacade內容的 。

transaction
DbTransaction

要使用的 DbTransaction

傳回

封裝 IDbContextTransaction 指定交易的 。

備註

如需詳細資訊和範例,請參閱 EF Core 中的交易

適用於

UseTransaction(DatabaseFacade, DbTransaction, Guid)

來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs
來源:
RelationalDatabaseFacadeExtensions.cs

DbTransaction設定 上資料庫作業 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

參數

databaseFacade
DatabaseFacade

DatabaseFacade內容的 。

transaction
DbTransaction

要使用的 DbTransaction

transactionId
Guid

交易的唯一識別碼。

傳回

封裝 IDbContextTransaction 指定交易的 。

備註

如需詳細資訊和範例,請參閱 EF Core 中的交易

適用於