IConventionServiceProperty 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
实体框架模型中的一个 IReadOnlyPropertyBase ,表示从中 DbContext注入的服务。
public interface IConventionServiceProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionPropertyBase, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyServiceProperty
public interface IConventionServiceProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionPropertyBase, Microsoft.EntityFrameworkCore.Metadata.IServiceProperty
type IConventionServiceProperty = interface
interface IReadOnlyServiceProperty
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface IConventionPropertyBase
interface IConventionAnnotatable
type IConventionServiceProperty = interface
interface IServiceProperty
interface IPropertyBase
interface IAnnotatable
interface IConventionPropertyBase
interface IConventionAnnotatable
Public Interface IConventionServiceProperty
Implements IConventionPropertyBase, IReadOnlyServiceProperty
Public Interface IConventionServiceProperty
Implements IConventionPropertyBase, IServiceProperty
- 实现
注解
此接口在创建模型期间使用,并允许修改元数据。 生成模型后, IServiceProperty 表示相同元数据的只读视图。
有关详细信息和示例,请参阅 模型生成约定 。
属性
| 名称 | 说明 |
|---|---|
| Builder |
获取可用于配置此服务属性的生成器。 |
| ClrType |
获取此属性类对象保存的值的类型。 (继承自 IPropertyBase) |
| DeclaringEntityType |
获取此属性所属的类型。 |
| DeclaringType |
获取此属性类对象所属的类型。 (继承自 IPropertyBase) |
| FieldInfo |
获取 FieldInfo 此属性类似对象的基础 CLR 字段。
这可能 |
| IsCollection |
获取一个值,该值指示属性是否为集合。 (继承自 IReadOnlyPropertyBase) |
| IsInModel |
指示此对象是否在模型中,即尚未从一个模型中删除。 (继承自 IConventionAnnotatable) |
| IsShadowProperty |
获取一个值,该值指示这是否为阴影属性。 阴影属性是实体类中没有相应属性的阴影属性。 该属性的当前值存储在实体类的实例中 ChangeTracker ,而不是存储在实体类的实例中。 (继承自 IPropertyBase) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Name |
获取类似于此属性的对象的名称。 (继承自 IPropertyBase) |
| ParameterBinding |
此属性 ServiceParameterBinding 的一个属性。 (继承自 IServiceProperty) |
| PropertyInfo |
获取 PropertyInfo 此属性类似对象的基础 CLR 属性。
这可能 |
| Sentinel |
获取指示未设置此属性的 sentinel 值。 (继承自 IReadOnlyPropertyBase) |