DiscriminatorLengthConvention Class

Definition

A convention that sets the maximum length for string discriminator properties.

public class DiscriminatorLengthConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
type DiscriminatorLengthConvention = class
    interface IModelFinalizingConvention
    interface IConvention
Public Class DiscriminatorLengthConvention
Implements IModelFinalizingConvention
Inheritance
DiscriminatorLengthConvention
Implements

Remarks

The maximum length is set to a value large enough to cover all discriminator values in the hierarchy.

See Model building conventions and TPH mapping of inheritance hierarchies for more information and examples.

Constructors

DiscriminatorLengthConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Creates a new instance of DiscriminatorLengthConvention.

Properties

Dependencies

Dependencies for this service.

RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

Applies to