语言

IReadOnlyServiceProperty 接口

定义

表示实体类型的属性,该属性表示从中 DbContext注入的服务。

public interface IReadOnlyServiceProperty : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyPropertyBase
type IReadOnlyServiceProperty = interface
    interface IReadOnlyPropertyBase
    interface IReadOnlyAnnotatable
Public Interface IReadOnlyServiceProperty
Implements IReadOnlyPropertyBase
派生
实现

注解

有关详细信息和示例,请参阅 建模实体类型和关系 。

属性

名称 说明
ClrType

获取此属性类对象保存的值的类型。

(继承自 IReadOnlyPropertyBase)
DeclaringEntityType

获取此属性所属的实体类型。

DeclaringType

获取此属性类对象所属的类型。

(继承自 IReadOnlyPropertyBase)
FieldInfo

获取 FieldInfo 此属性类似对象的基础 CLR 字段。 这可能 null 适用于阴影属性,或者如果支持字段未知。

(继承自 IReadOnlyPropertyBase)
IsCollection

获取一个值,该值指示属性是否为集合。

(继承自 IReadOnlyPropertyBase)
Item[String]

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

(继承自 IReadOnlyAnnotatable)
Name

获取类似于此属性的对象的名称。

(继承自 IReadOnlyPropertyBase)
ParameterBinding

此属性 ServiceParameterBinding 的一个属性。

PropertyInfo

获取 PropertyInfo 此属性类似对象的基础 CLR 属性。 这可能 null 适用于阴影属性,或者如果直接映射到字段。

(继承自 IReadOnlyPropertyBase)
Sentinel

获取指示未设置此属性的 sentinel 值。

(继承自 IReadOnlyPropertyBase)

方法

名称 说明
AnnotationsToDebugString(Int32)

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

(继承自 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(继承自 IReadOnlyAnnotatable)
GetAnnotation(String)

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

(继承自 IReadOnlyAnnotatable)
GetAnnotations()

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

(继承自 IReadOnlyAnnotatable)
GetFieldName()

获取此属性的后盾字段的名称,或者 null 如果后盾字段未知。

(继承自 IReadOnlyPropertyBase)
GetPropertyAccessMode()

PropertyAccessMode获取用于此属性类似对象的对象。

(继承自 IReadOnlyPropertyBase)
IsIndexerProperty()

获取一个值,该值指示这是否为索引器属性。 索引器属性是通过实体类上的索引器访问的。

(继承自 IReadOnlyPropertyBase)
IsShadowProperty()

获取一个值,该值指示这是否为阴影属性。 阴影属性是实体类中没有相应属性的阴影属性。 该属性的当前值存储在实体类的实例中 ChangeTracker ,而不是存储在实体类的实例中。

(继承自 IReadOnlyPropertyBase)
ToDebugString(MetadataDebugStringOptions, Int32)

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

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

适用于