IConventionKey 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示实体的主键或备用键。
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IKey
type IConventionKey = interface
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
type IConventionKey = interface
interface IConventionAnnotatable
interface IAnnotatable
interface IKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IReadOnlyKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IKey
- 实现
注解
此接口在创建模型期间使用,并允许修改元数据。 生成模型后, IKey 表示相同元数据的只读视图。
有关详细信息和示例,请参阅 模型生成约定 。
属性
| 名称 | 说明 |
|---|---|
| Builder |
获取可用于配置此密钥的生成器。 |
| DeclaringEntityType |
获取键所定义的实体类型。 这可能与在继承层次结构中定义密钥派生类型时定义的类型 Properties 不同(因为属性可能在基类型上定义)。 |
| IsInModel |
指示此对象是否在模型中,即尚未从一个模型中删除。 (继承自 IConventionAnnotatable) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Properties |
获取构成键的属性。 |