Share via


IInterceptors 接口

定义

一种服务,用于解析 IInterceptor 内部服务提供程序中 DbContext 或 中注册的所有服务的单个服务。

此类型通常由数据库提供程序 (和其他扩展) 使用。 它通常不用于应用程序代码。

public interface IInterceptors
type IInterceptors = interface
Public Interface IInterceptors

注解

服务生存期为 ServiceLifetime。 这意味着每个 DbContext 实例都将使用此服务自己的实例。 实现可能依赖于使用任何生存期注册的其他服务。 实现不需要是线程安全的。

有关详细信息和示例 ,请参阅 EF Core 侦听器

方法

Aggregate<TInterceptor>()

从在 或 内部服务提供程序中DbContext注册的所有实例中解析单个 TInterceptor

适用于