DbConfigurationLoadedEventArgs.ReplaceService<TService> Method (Func<TService, Object, TService>)
Adds a wrapping resolver to the configuration that is about to be locked. A wrapping resolver is a resolver that incepts a service would have been returned by the resolver chain and wraps or replaces it with another service of the same type.
Assembly: EntityFramework (in EntityFramework.dll)
public void ReplaceService<TService>( Func<TService, object, TService> serviceInterceptor )
Parameters
- serviceInterceptor
-
Type:
System.Func<TService, Object, TService>
A delegate that takes the unwrapped service and key and returns the wrapped or replaced service.
Type Parameters
- TService
The type of service to wrap or replace.