IDbTransactionInterceptor.TransactionUsed 方法

定义

在调用 后 RelationalDatabaseFacadeExtensions.UseTransaction 立即调用。

public System.Data.Common.DbTransaction TransactionUsed (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData eventData, System.Data.Common.DbTransaction result);
public virtual System.Data.Common.DbTransaction TransactionUsed (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData eventData, System.Data.Common.DbTransaction result);
abstract member TransactionUsed : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * System.Data.Common.DbTransaction -> System.Data.Common.DbTransaction
abstract member TransactionUsed : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * System.Data.Common.DbTransaction -> System.Data.Common.DbTransaction
override this.TransactionUsed : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.TransactionEventData * System.Data.Common.DbTransaction -> System.Data.Common.DbTransaction
Public Function TransactionUsed (connection As DbConnection, eventData As TransactionEventData, result As DbTransaction) As DbTransaction
Public Overridable Function TransactionUsed (connection As DbConnection, eventData As TransactionEventData, result As DbTransaction) As DbTransaction

参数

connection
DbConnection

连接。

eventData
TransactionEventData

有关连接和事务的上下文信息。

result
DbTransaction

DbTransaction传递给 的 RelationalDatabaseFacadeExtensions.UseTransaction。 此值通常用作此方法实现的返回值。

返回

将用作传递到 RelationalDatabaseFacadeExtensions.UseTransaction 的有效值 对于任何不尝试更改结果的侦听器,此方法的实现是返回 result 传入的值。

适用于