IConventionCheckConstraint 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示实体类型的检查约束。
public interface IConventionCheckConstraint : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyCheckConstraint
public interface IConventionCheckConstraint : Microsoft.EntityFrameworkCore.Metadata.ICheckConstraint
public interface IConventionCheckConstraint : Microsoft.EntityFrameworkCore.Metadata.ICheckConstraint, Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable
type IConventionCheckConstraint = interface
interface IReadOnlyCheckConstraint
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
type IConventionCheckConstraint = interface
interface ICheckConstraint
type IConventionCheckConstraint = interface
interface ICheckConstraint
interface IAnnotatable
interface IConventionAnnotatable
Public Interface IConventionCheckConstraint
Implements IConventionAnnotatable, IReadOnlyCheckConstraint
Public Interface IConventionCheckConstraint
Implements ICheckConstraint
Public Interface IConventionCheckConstraint
Implements ICheckConstraint, IConventionAnnotatable
- 实现
注解
有关详细信息和示例,请参阅 数据库检查约束 。
属性
| 名称 | 说明 |
|---|---|
| Builder |
获取可用于配置此检查约束的生成器。 |
| EntityType |
获取定义此检查约束的实体类型。 |
| IsInModel |
指示此对象是否在模型中,即尚未从一个模型中删除。 (继承自 IConventionAnnotatable) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| ModelName |
获取模型中的 check 约束的名称。 (继承自 IReadOnlyCheckConstraint) |
| Name |
获取数据库中的 check 约束的名称。 (继承自 ICheckConstraint) |
| Sql |
获取数据库中的 check 约束中使用的约束 SQL。 (继承自 ICheckConstraint) |
方法
扩展方法
| 名称 | 说明 |
|---|---|
| AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean) |
向对象添加批注。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
获取针对对象上声明的所有批注的调试字符串。 |
| GetAnnotation(IAnnotatable, String) |
获取具有给定名称的批注,如果不存在,则引发该批注。 |
| GetAnnotation(IConventionAnnotatable, String) |
获取具有给定名称的批注,如果不存在,则引发该批注。 |
| SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean) |
设置存储在给定名称下的批注。 如果已存在具有指定名称的批注,则覆盖现有批注。 如果 |
| ToDebugString(ICheckConstraint, MetadataDebugStringOptions, Int32) |
创建给定元数据的可读表示形式。 警告:不要依赖于返回的字符串的格式。 它仅用于调试,可以在版本之间任意更改。 |