System.Data.Entity.Infrastructure.Interception 命名空間

類別

名稱 Description
BeginTransactionInterceptionContext

代表與實作呼叫 BeginTransaction(IsolationLevel) 相關的上下文資訊。

DatabaseLogFormatter

這是設定在屬性上的Action<T>Log預設日誌格式化器。 另一種格式化器可透過建立繼承該類別並覆寫部分或全部方法來改變行為來使用不同的格式化器。

DatabaseLogger

一個簡單的記錄器,用來將 SQL 及其他資料庫操作記錄到主控台或檔案。 記錄器可以註冊在程式碼中,或是在應用程式的 web.config/app.config 檔案中。

DbCommandDispatcher

用於派遣操作到 , DbCommand 使任何 IDbCommandInterceptor 註冊在 的 DbInterception 使用者在操作執行前後都會收到通知。 此類別的實例可透過 Dispatch 流暢 API 取得。

DbCommandInterceptionContext

代表與呼叫實 IDbCommandInterceptor 作相關的情境資訊。

DbCommandInterceptionContext<TResult>

代表與實 IDbCommandInterceptor 作呼叫相關的上下文資訊,包括操作結果。

DbCommandInterceptor

實作 IDbCommandInterceptor的基底類別。 當介面中只有一兩種方法需要實作時,此類別便於使用。

DbCommandTreeInterceptionContext

代表與呼叫實 IDbCommandTreeInterceptor 作相關的情境資訊。

DbConfigurationInterceptionContext

代表與呼叫實 IDbConfigurationInterceptor 作相關的情境資訊。

DbConnectionDispatcher

用於派遣操作到 , DbConnection 使任何 IDbConnectionInterceptor 註冊在 的 DbInterception 使用者在操作執行前後都會收到通知。 此類別的實例可透過 Dispatch 流暢 API 取得。

DbConnectionInterceptionContext

代表與呼叫相關的上下文資訊,但這些呼叫 DbConnection 不會回傳任何結果。

DbConnectionInterceptionContext<TResult>

代表與返回類型 TResult的DbConnection呼叫相關的上下文資訊。

DbConnectionPropertyInterceptionContext<TValue>

表示與屬性設定器在 上DbConnection呼叫 的TValue上下文資訊。

DbDispatchers

透過 Dispatch 流暢 API 提供所有調度器的存取權限。

DbInterception

這裡是攔截機的 IDbInterceptor 註冊點。 當 EF 執行特定操作(例如對資料庫執行指令)時,攔截器會收到通知。 如需範例,請參閱 IDbCommandInterceptor。

DbInterceptionContext

代表與呼叫實 IDbInterceptor 作相關的情境資訊。

DbTransactionDispatcher

用於派遣操作到 , DbTransaction 使任何 IDbTransactionInterceptor 註冊在 的 DbInterception 使用者在操作執行前後都會收到通知。 此類別的實例可透過 Dispatch 流暢 API 取得。

DbTransactionInterceptionContext

代表與呼叫相關的上下文資訊,但這些呼叫 DbTransaction 不會回傳任何結果。

DbTransactionInterceptionContext<TResult>

代表與返回類型 TResult的DbTransaction呼叫相關的上下文資訊。

EnlistTransactionInterceptionContext

代表與實作呼叫 EnlistTransaction(Transaction) 相關的上下文資訊。

MutableInterceptionContext

代表與未回傳任何結果的通話相關的上下文資訊。

MutableInterceptionContext<TResult>

代表與回傳類型 TResult的通話相關的上下文資訊。

PropertyInterceptionContext<TValue>

表示與屬性設定器 TValue呼叫 類型 的上下文資訊。

介面

名稱 Description
IDbCommandInterceptor

實作此介面的物件可註冊 DbInterception 以接收 Entity Framework 執行指令時的通知。

IDbCommandTreeInterceptor

實作此介面的物件可註冊 DbInterception ,以便在 Entity Framework 建立 DbCommandTree 指令樹時接收通知。

IDbConfigurationInterceptor

實作此介面的物件可註冊 DbInterception 以接收 Entity Framework 載入應用程式的 DbConfiguration通知。

IDbConnectionInterceptor

實作此介面的物件可註冊 DbInterception ,以便在 Entity Framework 對 執行操作 DbTransaction時接收通知。

IDbInterceptor

這是所有提供各種類型與操作攔截點介面的基礎介面。 如需範例,請參閱 IDbCommandInterceptor。 攔截機已登記於該 DbInterception 級別。

IDbTransactionInterceptor

實作此介面的物件可註冊 DbInterception ,以便在 Entity Framework 提交或回滾交易時收到通知。