Share via


ProviderConventionSetBuilder Class

Definition

A service on the EF internal service provider that creates the ConventionSet for the current 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 class ProviderConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IProviderConventionSetBuilder
type ProviderConventionSetBuilder = class
    interface IProviderConventionSetBuilder
Public Class ProviderConventionSetBuilder
Implements IProviderConventionSetBuilder
Inheritance
ProviderConventionSetBuilder
Derived
Implements

Remarks

Database providers should implement this service by inheriting from either this class (for non-relational providers) or `RelationalConventionSetBuilder` (for 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

ProviderConventionSetBuilder(ProviderConventionSetBuilderDependencies)

Initializes a new instance of the ProviderConventionSetBuilder class.

Properties

Dependencies

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.

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

Replaces an existing convention with a derived convention.

Applies to