DbContext.IInfrastructure<IServiceProvider>.Instance Property

Definition

Gets the scoped IServiceProvider being used to resolve services.

This property is intended for use by extension methods that need to make use of services not directly exposed in the public API surface.

C#
IServiceProvider Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.Instance { get; }

Property Value

Implements

Remarks

See Accessing DbContext services for more information and examples.

Applies to

Product Versions
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0