共用方式為


DbTransactionDispatcher 類別

定義

用於將作業分派至 , DbTransaction 如此一來, IDbTransactionInterceptor 任何已註冊 DbInterception 的 都會在作業執行之前和之後收到通知。 這個類別的實例是透過 Dispatch Fluent API 取得。

public class DbTransactionDispatcher
type DbTransactionDispatcher = class
Public Class DbTransactionDispatcher
繼承
DbTransactionDispatcher

備註

與 互動 DbTransaction 時,Entity Framework 會在內部使用此類別。 它會公開提供,讓在核心 EF 元件外部執行的程式碼可以加入宣告命令攔截/追蹤。 這通常是由代表 EF 執行命令的 EF 提供者所完成。

方法

Commit(DbTransaction, DbInterceptionContext)

在呼叫 之前/之後 Commit() ,傳送 Committing(DbTransaction, DbTransactionInterceptionContext)Committed(DbTransaction, DbTransactionInterceptionContext) 至任何 IDbConnectionInterceptor 已註冊 DbInterception 的 。

Dispose(DbTransaction, DbInterceptionContext)

在呼叫 之前/之後 Dispose() ,傳送 Disposing(DbTransaction, DbTransactionInterceptionContext)Disposed(DbTransaction, DbTransactionInterceptionContext) 至任何 IDbConnectionInterceptor 已註冊 DbInterception 的 。

Equals(Object)

用於將作業分派至 , DbTransaction 如此一來, IDbTransactionInterceptor 任何已註冊 DbInterception 的 都會在作業執行之前和之後收到通知。 這個類別的實例是透過 Dispatch Fluent API 取得。

GetConnection(DbTransaction, DbInterceptionContext)

在取得 Connection 之前/之後,傳送 ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>)ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>) 至任何 IDbTransactionInterceptor 已註冊 DbInterception 的 。

GetHashCode()

用於將作業分派至 , DbTransaction 如此一來, IDbTransactionInterceptor 任何已註冊 DbInterception 的 都會在作業執行之前和之後收到通知。 這個類別的實例是透過 Dispatch Fluent API 取得。

GetIsolationLevel(DbTransaction, DbInterceptionContext)

在取得 IsolationLevel 之前/之後,傳送 IsolationLevelGetting(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>)IsolationLevelGot(DbTransaction, DbTransactionInterceptionContext<IsolationLevel>) 至任何 IDbTransactionInterceptor 已註冊 DbInterception 的 。

GetType()

取得目前執行個體的 Type

Rollback(DbTransaction, DbInterceptionContext)

在呼叫 之前/之後 Rollback() ,傳送 RollingBack(DbTransaction, DbTransactionInterceptionContext)RolledBack(DbTransaction, DbTransactionInterceptionContext) 至任何 IDbConnectionInterceptor 已註冊 DbInterception 的 。

ToString()

用於將作業分派至 , DbTransaction 如此一來, IDbTransactionInterceptor 任何已註冊 DbInterception 的 都會在作業執行之前和之後收到通知。 這個類別的實例是透過 Dispatch Fluent API 取得。

適用於