RuntimeKey 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示实体类型的主键或备用键。
[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeKey : Microsoft.EntityFrameworkCore.Infrastructure.RuntimeAnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeKey
public class RuntimeKey : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeKey
[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeKey : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeKey
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeKey = class
inherit RuntimeAnnotatableBase
interface IRuntimeKey
interface IKey
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IAnnotatable
type RuntimeKey = class
inherit AnnotatableBase
interface IRuntimeKey
interface IKey
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IAnnotatable
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeKey = class
inherit AnnotatableBase
interface IRuntimeKey
interface IKey
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IAnnotatable
Public Class RuntimeKey
Inherits RuntimeAnnotatableBase
Implements IRuntimeKey
Public Class RuntimeKey
Inherits AnnotatableBase
Implements IRuntimeKey
- 继承
- 继承
- 特性
- 实现
-
IAnnotatable IReadOnlyAnnotatable IKey Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeKey IReadOnlyKey
注解
有关详细信息和示例,请参阅 建模实体类型和关系 。
构造函数
| 名称 | 说明 |
|---|---|
| RuntimeKey(IReadOnlyList<RuntimeProperty>) |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
属性
| 名称 | 说明 |
|---|---|
| DebugView |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| DeclaringEntityType |
获取键所定义的实体类型。 这可能与在继承层次结构中定义密钥派生类型时定义的类型 Properties 不同(因为属性可能在基类型上定义)。 |
| IdentityMapFactory |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| IsReadOnly |
指示当前对象是否为只读。 (继承自 AnnotatableBase) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Properties |
获取构成键的属性。 |
| ReferencingForeignKeys |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |