RelationalConventionSetBuilder Class

Definition

A service on the EF internal service provider that creates the ConventionSet for the current relational database provider. This is combined with IConventionSetPlugin instances to produce the full convention set exposed by the IConventionSetBuilder service.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public abstract class RelationalConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.ProviderConventionSetBuilder
type RelationalConventionSetBuilder = class
    inherit ProviderConventionSetBuilder
Public MustInherit Class RelationalConventionSetBuilder
Inherits ProviderConventionSetBuilder
Inheritance
RelationalConventionSetBuilder
Derived

Remarks

Database providers should implement this service by inheriting from either this class (for relational providers) or ProviderConventionSetBuilder (for non-relational providers).

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Model building conventions for more information and examples.

Constructors

RelationalConventionSetBuilder(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Initializes a new instance of the RelationalConventionSetBuilder class.

Properties

Dependencies

Dependencies for this service.

(Inherited from ProviderConventionSetBuilder)
RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

CreateConventionSet()

Builds and returns the convention set for the current database provider.

ReplaceConvention<TConvention,TImplementation>(IList<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

(Inherited from ProviderConventionSetBuilder)
ReplaceConvention<TConvention,TImplementation>(List<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

(Inherited from ProviderConventionSetBuilder)

Applies to