CosmosDiscriminatorConvention 类

定义

将实体类型的鉴别器值配置为实体类型名称的约定。

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
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
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
继承
CosmosDiscriminatorConvention
实现

注解

有关详细信息和示例,请参阅模型生成约定和使用 EF Core 访问 Azure Cosmos DB

构造函数

CosmosDiscriminatorConvention(ProviderConventionSetBuilderDependencies)

创建 CosmosDiscriminatorConvention 的新实例。

属性

Dependencies

此服务的依赖项。

(继承自 DiscriminatorConvention)

方法

ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>)

将实体类型的鉴别器值配置为实体类型名称的约定。

ProcessDiscriminatorPropertySet(IConventionEntityTypeBuilder, String, IConventionContext<String>)

在设置鉴别器属性后调用。

(继承自 DiscriminatorConvention)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后调用。

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

在对实体类型更改批注后调用。

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

在实体类型的基类型更改后调用。

ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

在从模型中删除实体类型后调用。

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

在更改外键的所有权值后调用。

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

在更改外键的所有权值后调用。

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

在删除外键后调用。

SetDefaultDiscriminatorValues(IEnumerable<IConventionEntityType>, IConventionDiscriminatorBuilder)

为给定实体类型配置鉴别器值。

SetDefaultDiscriminatorValues(IEnumerable<IConventionEntityType>, IConventionDiscriminatorBuilder)

为给定实体类型配置鉴别器值。

(继承自 DiscriminatorConvention)

适用于