語言

IDbConfigurationInterceptor 介面

定義

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

public interface IDbConfigurationInterceptor : System.Data.Entity.Infrastructure.Interception.IDbInterceptor
type IDbConfigurationInterceptor = interface
    interface IDbInterceptor
Public Interface IDbConfigurationInterceptor
Implements IDbInterceptor
衍生
實作

備註

攔截器也可以註冊在應用程式的設定檔中。 請參閱 http://go.microsoft.com/fwlink/?LinkId=260883 更多關於實體框架設定的資訊。

方法

名稱 Description
Loaded(DbConfigurationLoadedEventArgs, DbConfigurationInterceptionContext)

發生在 EF 初始化時,建構完成後 DbConfiguration ,但剛鎖定準備使用之前。 利用此事件檢查及/或覆蓋在設定鎖定前已註冊的服務。 請注意,這類攔截器應謹慎使用,因為這可能會阻止工具發現執行時使用的相同配置。

適用於