共用方式為


TransactionsDatabaseFacadeExtensions.EnlistTransaction 方法

定義

指定要用於資料庫作業的現有 Transaction

public static void EnlistTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Transactions.Transaction transaction);
public static void EnlistTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Transactions.Transaction? transaction);
static member EnlistTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Transactions.Transaction -> unit
<Extension()>
Public Sub EnlistTransaction (databaseFacade As DatabaseFacade, transaction As Transaction)

參數

databaseFacade
DatabaseFacade

DatabaseFacade內容的 。

transaction
Transaction

要使用的交易。

備註

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

適用於