DbConfigurationLoadedEventArgs.ReplaceService<TService> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public void ReplaceService<TService> (Func<TService,object,TService> serviceInterceptor);
member this.ReplaceService : Func<'Service, obj, 'Service> -> unit
Public Sub ReplaceService(Of TService) (serviceInterceptor As Func(Of TService, Object, TService))
Type Parameters
- TService
The type of service to wrap or replace.
Parameters
A delegate that takes the unwrapped service and key and returns the wrapped or replaced service.
Applies to
Entity Framework