다음을 통해 공유


CosmosDiscriminatorConvention Class

Definition

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

public class CosmosDiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.DiscriminatorConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention
public class CosmosDiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.DiscriminatorConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
public class CosmosDiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.DiscriminatorConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention
public class CosmosDiscriminatorConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.DiscriminatorConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelEmbeddedDiscriminatorNameConvention
type CosmosDiscriminatorConvention = class
    inherit DiscriminatorConvention
    interface IEntityTypeAddedConvention
    interface IConvention
type CosmosDiscriminatorConvention = class
    inherit DiscriminatorConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IEntityTypeAddedConvention
type CosmosDiscriminatorConvention = class
    inherit DiscriminatorConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeAnnotationChangedConvention
type CosmosDiscriminatorConvention = class
    inherit DiscriminatorConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IConvention
    interface IForeignKeyRemovedConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeAnnotationChangedConvention
    interface IModelEmbeddedDiscriminatorNameConvention
Public Class CosmosDiscriminatorConvention
Inherits DiscriminatorConvention
Implements IEntityTypeAddedConvention
Public Class CosmosDiscriminatorConvention
Inherits DiscriminatorConvention
Implements IEntityTypeAddedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention
Public Class CosmosDiscriminatorConvention
Inherits DiscriminatorConvention
Implements IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention
Public Class CosmosDiscriminatorConvention
Inherits DiscriminatorConvention
Implements IEntityTypeAddedConvention, IEntityTypeAnnotationChangedConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, IModelEmbeddedDiscriminatorNameConvention
Inheritance
CosmosDiscriminatorConvention
Implements

Remarks

See Model building conventions, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Constructors

CosmosDiscriminatorConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of CosmosDiscriminatorConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from DiscriminatorConvention)

Methods

ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>) System.Object.ProcessDiscriminatorPropertySet(Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder,System.String,Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext{System.String})
ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Called after a discriminator property is set.

(Inherited from DiscriminatorConvention)
ProcessEmbeddedDiscriminatorName(IConventionModelBuilder, String, String, IConventionContext<String>)

Called after HasEmbeddedDiscriminatorName(String) has been called.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on an entity type.

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.

ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Called after the ownership value for a foreign key is changed.

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after the ownership value for a foreign key is changed.

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Called after a foreign key is removed.

SetDefaultDiscriminatorValues(IEnumerable<IConventionEntityType>, IConventionDiscriminatorBuilder)

Configures the discriminator values for the given entity types.

SetDefaultDiscriminatorValues(IEnumerable<IConventionEntityType>, IConventionDiscriminatorBuilder)

Configures the discriminator values for the given entity types.

(Inherited from DiscriminatorConvention)

Applies to