IRelationalTransactionManager.UseTransaction 方法

定义

重载

UseTransaction(DbTransaction)

指定要用于数据库操作的现有 DbTransaction 值。

UseTransaction(DbTransaction, Guid)

指定要用于数据库操作的现有 DbTransaction 值。

UseTransaction(DbTransaction)

Source:
IRelationalTransactionManager.cs
Source:
IRelationalTransactionManager.cs
Source:
IRelationalTransactionManager.cs

指定要用于数据库操作的现有 DbTransaction 值。

public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction);
public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction);
abstract member UseTransaction : System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Function UseTransaction (transaction As DbTransaction) As IDbContextTransaction

参数

transaction
DbTransaction

要使用的事务。

返回

包装提供的事务的 实例 IDbTransaction

适用于

UseTransaction(DbTransaction, Guid)

Source:
IRelationalTransactionManager.cs
Source:
IRelationalTransactionManager.cs
Source:
IRelationalTransactionManager.cs

指定要用于数据库操作的现有 DbTransaction 值。

public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (System.Data.Common.DbTransaction transaction, Guid transactionId);
public Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (System.Data.Common.DbTransaction? transaction, Guid transactionId);
abstract member UseTransaction : System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Function UseTransaction (transaction As DbTransaction, transactionId As Guid) As IDbContextTransaction

参数

transaction
DbTransaction

要使用的事务。

transactionId
Guid

事务的唯一标识符。

返回

包装提供的事务的 实例 IDbTransaction

适用于