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 中的事务

适用于