共用方式為


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 傳入的值。

適用於