IDbConfigurationInterceptor 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在 Entity Framework 加载应用程序的DbConfiguration实体框架时,可以注册DbInterception实现此接口的对象以接收通知。
public interface IDbConfigurationInterceptor : System.Data.Entity.Infrastructure.Interception.IDbInterceptor
type IDbConfigurationInterceptor = interface
interface IDbInterceptor
Public Interface IDbConfigurationInterceptor
Implements IDbInterceptor
- 派生
- 实现
注解
还可以在应用程序的配置文件中注册侦听器。 有关 Entity Framework 配置的详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkId=260883 。
方法
| 名称 | 说明 |
|---|---|
| Loaded(DbConfigurationLoadedEventArgs, DbConfigurationInterceptionContext) |
在构造 EF 初始化期间发生, DbConfiguration 但在锁定它可供使用之前发生。 使用此事件可以检查和/或替代在锁定配置之前已注册的服务。 请注意,应仔细使用此类型的侦听器,因为它可能会阻止工具发现运行时使用的相同配置。 |