RuntimePropertyBase 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
导航和属性的基类型。
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.RuntimeAnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class RuntimePropertyBase : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimePropertyBase = class
inherit RuntimeAnnotatableBase
interface IRuntimePropertyBase
interface IPropertyBase
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface IAnnotatable
type RuntimePropertyBase = class
inherit AnnotatableBase
interface IRuntimePropertyBase
interface IPropertyBase
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface IAnnotatable
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimePropertyBase = class
inherit AnnotatableBase
interface IRuntimePropertyBase
interface IPropertyBase
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface IAnnotatable
Public MustInherit Class RuntimePropertyBase
Inherits RuntimeAnnotatableBase
Implements IRuntimePropertyBase
Public MustInherit Class RuntimePropertyBase
Inherits AnnotatableBase
Implements IRuntimePropertyBase
- 继承
- 继承
- 派生
- 特性
- 实现
-
IAnnotatable IReadOnlyAnnotatable Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimePropertyBase IPropertyBase IReadOnlyPropertyBase
注解
有关详细信息和示例,请参阅 建模实体类型和关系 。
构造函数
| 名称 | 说明 |
|---|---|
| RuntimePropertyBase(String, PropertyInfo, FieldInfo, PropertyAccessMode) |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
属性
| 名称 | 说明 |
|---|---|
| ClrType |
获取此属性类对象保存的值的类型。 |
| DeclaringEntityType |
获取此属性类对象所属的类型。 |
| DeclaringType |
获取此属性类对象所属的类型。 |
| Indexes |
这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。 |
| IsCollection |
获取一个值,该值指示属性是否为集合。 |
| IsReadOnly |
指示当前对象是否为只读。 (继承自 AnnotatableBase) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Name |
获取类似于此属性的对象的名称。 |
| Sentinel |
获取指示未设置此属性的 sentinel 值。 |
方法
显式接口实现
扩展方法
| 名称 | 说明 |
|---|---|
| AnnotationsToDebugString(IAnnotatable, Int32) |
获取针对对象上声明的所有批注的调试字符串。 |
| GetCurrentValueComparer(IPropertyBase) |
获取用于 IComparer<T> 比较跟踪 IUpdateEntry 条目中的值。 |
| GetDefaultColumnMappings(IPropertyBase) |
返回属性要映射到的默认列。 |
| GetGetter(IPropertyBase) |
获取一个 IClrPropertyGetter 用于读取此属性的值。 请注意,对于阴影属性(IsShadowProperty(IPropertyBase))调用此方法是一个错误,因为此类属性没有关联 MemberInfo。 |
| GetIndex(IPropertyBase) |
获取此属性的属性索引。 |
| GetJsonElementMappings(IPropertyBase) |
返回此属性的 JSON 元素映射。 |
| GetMemberInfo(IPropertyBase, Boolean, Boolean) |
PropertyInfo FieldInfo获取或用于获取或设置给定属性的值。 请注意,对于阴影属性(IsShadowProperty(IPropertyBase))调用此方法是一个错误,因为此类属性没有关联 MemberInfo。 |
| GetPropertyAccessMode(IPropertyBase) |
PropertyAccessMode获取用于此属性的用途。
|
| GetTableColumnMappings(IPropertyBase) |
返回属性映射到的表列。 |
| GetViewColumnMappings(IPropertyBase) |
返回属性映射到的视图列。 |
| IsIndexerProperty(IPropertyBase) |
获取一个值,该值指示这是否为索引器属性。 索引器属性是通过实体类上的索引器访问的。 |
| IsShadowProperty(IPropertyBase) |
已过时.
获取一个值,该值指示这是否为阴影属性。 阴影属性是实体类中没有相应属性的阴影属性。 该属性的当前值存储在实体类的实例中 ChangeTracker ,而不是存储在实体类的实例中。 |