CheckConstraintConvention 类

定义

一种约定,可确保派生类型的检查约束与基类型上的检查约束兼容。 此外,还可以确保声明类型是最新的。

public class CheckConstraintConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention
type CheckConstraintConvention = class
    interface IEntityTypeBaseTypeChangedConvention
    interface IConvention
    interface IEntityTypeAddedConvention
Public Class CheckConstraintConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention
继承
CheckConstraintConvention
实现

注解

有关详细信息和示例,请参阅 模型生成约定

构造函数

CheckConstraintConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

创建 CheckConstraintConvention 的新实例。

属性

Dependencies

此服务的依赖项。

RelationalDependencies

此服务的关系提供程序特定的依赖项。

方法

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

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

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

适用于