Share via


IReadOnlyCheckConstraint 接口

定义

表示实体类型上的检查约束。

public interface IReadOnlyCheckConstraint : Microsoft.EntityFrameworkCore.Infrastructure.IReadOnlyAnnotatable
type IReadOnlyCheckConstraint = interface
    interface IReadOnlyAnnotatable
Public Interface IReadOnlyCheckConstraint
Implements IReadOnlyAnnotatable
派生
实现

注解

有关详细信息和示例,请参阅数据库检查约束

属性

EntityType

获取定义此检查约束的实体类型。

Item[String]

获取具有给定名称的批注的值,如果不存在,则返回 null 该值。

(继承自 IReadOnlyAnnotatable)
ModelName

获取模型中检查约束的名称。

Name

获取检查约束的数据库名称。

Sql

获取数据库中检查约束中使用的约束 sql。

方法

AnnotationsToDebugString(Int32)

获取对象上声明的所有注释的调试字符串。

(继承自 IReadOnlyAnnotatable)
FindAnnotation(String)

获取具有给定名称的批注,如果不存在,则返回 null

(继承自 IReadOnlyAnnotatable)
GetAnnotation(String)

获取具有给定名称的批注,如果不存在,则引发该批注。

(继承自 IReadOnlyAnnotatable)
GetAnnotations()

获取当前对象上的所有批注。

(继承自 IReadOnlyAnnotatable)
GetDefaultName()

返回将用于此检查约束的默认数据库名称。

GetDefaultName(StoreObjectIdentifier)

返回将用于此检查约束的默认数据库名称。

GetName(StoreObjectIdentifier)

获取检查约束的数据库名称。

ToDebugString(MetadataDebugStringOptions, Int32)

创建给定元数据的可读表示形式。

警告:不要依赖于返回的字符串的格式。 它仅用于调试,可能会在发布之间任意更改。

适用于