EntityFrameworkRelationalServicesBuilder Class

Definition

A builder API designed for relational database providers to use when registering services.

Providers should create an instance of this class, use its methods to register services, and then call TryAddCoreServices() to fill out the remaining Entity Framework services.

Entity Framework ensures that services are registered with the appropriate scope. In some cases a provider may register a service with a different scope, but great care must be taken that all its dependencies can handle the new scope, and that it does not cause issue for services that depend on it.

public class EntityFrameworkRelationalServicesBuilder : Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
type EntityFrameworkRelationalServicesBuilder = class
    inherit EntityFrameworkServicesBuilder
Public Class EntityFrameworkRelationalServicesBuilder
Inherits EntityFrameworkServicesBuilder
Inheritance
EntityFrameworkRelationalServicesBuilder

Constructors

EntityFrameworkRelationalServicesBuilder(IServiceCollection)

Used by relational database providers to create a new EntityFrameworkRelationalServicesBuilder for registration of provider services.

Fields

RelationalServices

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

This dictionary is exposed for testing and provider-validation only. It should not be used from application code.

Properties

ServiceCollectionMap

Access to the underlying ServiceCollectionMap.

(Inherited from EntityFrameworkServicesBuilder)

Methods

GetServiceCharacteristics(Type)

Gets the ServiceCharacteristics for the given service type.

TryAdd(Type, Object)

Adds an implementation of an Entity Framework service only if one has not already been registered. This method can only be used for singleton services.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd(Type, Type)

Adds an implementation of an Entity Framework service only if one has not already been registered. The scope of the service is automatically defined by Entity Framework.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd(Type, Type, Func<IServiceProvider,Object>)

Adds a factory for an Entity Framework service only if one has not already been registered. The scope of the service is automatically defined by Entity Framework.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd<TService,TImplementation>()

Adds an implementation of an Entity Framework service only if one has not already been registered. The scope of the service is automatically defined by Entity Framework.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Adds a factory for an Entity Framework service only if one has not already been registered. The scope of the service is automatically defined by Entity Framework.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd<TService>(Func<IServiceProvider,TService>)

Adds a factory for an Entity Framework service only if one has not already been registered. The scope of the service is automatically defined by Entity Framework.

(Inherited from EntityFrameworkServicesBuilder)
TryAdd<TService>(TService)

Adds an implementation of an Entity Framework service only if one has not already been registered. This method can only be used for singleton services.

(Inherited from EntityFrameworkServicesBuilder)
TryAddCoreServices()

Registers default implementations of all services, including relational services, not already registered by the provider. Relational database providers must call this method as the last step of service registration--that is, after all provider services have been registered.

TryAddProviderSpecificServices(Action<ServiceCollectionMap>)

Database providers should call this method for access to the underlying ServiceCollectionMap such that provider-specific services can be registered. Note that implementations of Entity Framework services should be registered directly on the EntityFrameworkServicesBuilder and not through this method.

(Inherited from EntityFrameworkServicesBuilder)

Explicit Interface Implementations

IInfrastructure<IServiceCollection>.Instance

Gets the IServiceCollection being configured.

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

(Inherited from EntityFrameworkServicesBuilder)

Applies to