Share via


ProxiesServiceCollectionExtensions.AddEntityFrameworkProxies Method

Definition

Adds the services required for proxy support in Entity Framework.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddEntityFrameworkProxies (this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection);
static member AddEntityFrameworkProxies : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddEntityFrameworkProxies (serviceCollection As IServiceCollection) As IServiceCollection

Parameters

serviceCollection
IServiceCollection

The IServiceCollection to add services to.

Returns

The same service collection so that multiple calls can be chained.

Remarks

Calling this method is no longer necessary when building most applications, including those that use dependency injection in ASP.NET or elsewhere. It is only needed when building the internal service provider for use with the UseInternalServiceProvider(IServiceProvider) method. This is not recommend other than for some advanced scenarios.

Applies to