Share via


DiscriminatorConvention Class

Definition

A convention that configures the discriminator value for entity types in a hierarchy as the entity type name.

public class DiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeRemovedConvention
public class DiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IDiscriminatorPropertySetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeRemovedConvention
type DiscriminatorConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IEntityTypeRemovedConvention
type DiscriminatorConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IEntityTypeRemovedConvention
    interface IDiscriminatorPropertySetConvention
Public Class DiscriminatorConvention
Implements IEntityTypeBaseTypeChangedConvention, IEntityTypeRemovedConvention
Public Class DiscriminatorConvention
Implements IDiscriminatorPropertySetConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeRemovedConvention
Inheritance
DiscriminatorConvention
Derived
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

DiscriminatorConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of DiscriminatorConvention.

Properties

Dependencies

Dependencies for this service.

Methods

ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Called after a discriminator property is set.

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after an entity type is removed from the model.

SetDefaultDiscriminatorValues(IEnumerable<IConventionEntityType>, IConventionDiscriminatorBuilder)

Configures the discriminator values for the given entity types.

Applies to