IDbContextOptionsExtension.ApplyServices(IServiceCollection) Method

Definition

Adds the services required to make the selected options work. This is used when there is no external IServiceProvider and EF is maintaining its own service provider internally. This allows database providers (and other extensions) to register their required services when EF is creating an service provider.

public void ApplyServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services);
public bool ApplyServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services);
abstract member ApplyServices : Microsoft.Extensions.DependencyInjection.IServiceCollection -> unit
abstract member ApplyServices : Microsoft.Extensions.DependencyInjection.IServiceCollection -> bool
Public Sub ApplyServices (services As IServiceCollection)
Public Function ApplyServices (services As IServiceCollection) As Boolean

Parameters

services
IServiceCollection

The collection to add services to.

Returns

True if a database provider and was registered; false otherwise.

Applies to