共用方式為


IRelationalTransactionManager.UseTransaction 方法

定義

多載

UseTransaction(DbTransaction)

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

UseTransaction(DbTransaction, Guid)

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

UseTransaction(DbTransaction)

來源:
IRelationalTransactionManager.cs
來源:
IRelationalTransactionManager.cs
來源:
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)

來源:
IRelationalTransactionManager.cs
來源:
IRelationalTransactionManager.cs
來源:
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 實例,會包裝所提供的交易。

適用於