IConventionTypeBaseBuilder.ComplexProperty 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ComplexProperty(MemberInfo, Type, Boolean) |
返回一个 对象,该对象可用于配置具有给定成员信息的复杂属性。 如果不存在匹配的属性,则将添加新属性。 |
ComplexProperty(Type, String, Type, Boolean) |
返回一个 对象,该对象可用于配置具有给定名称的复杂属性。 如果不存在匹配的属性,则将添加新属性。 |
ComplexProperty(MemberInfo, Type, Boolean)
返回一个 对象,该对象可用于配置具有给定成员信息的复杂属性。 如果不存在匹配的属性,则将添加新属性。
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexPropertyBuilder? ComplexProperty (System.Reflection.MemberInfo memberInfo, Type? complexType = default, bool fromDataAnnotation = false);
abstract member ComplexProperty : System.Reflection.MemberInfo * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexPropertyBuilder
Public Function ComplexProperty (memberInfo As MemberInfo, Optional complexType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionComplexPropertyBuilder
参数
- memberInfo
- MemberInfo
属性 PropertyInfo 的 或 FieldInfo 。
- complexType
- Type
目标复杂类型。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
一个对象,如果属性存在于类型上,则可用于配置该属性, null
否则为 。
适用于
ComplexProperty(Type, String, Type, Boolean)
返回一个 对象,该对象可用于配置具有给定名称的复杂属性。 如果不存在匹配的属性,则将添加新属性。
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexPropertyBuilder? ComplexProperty (Type propertyType, string propertyName, Type? complexType = default, bool fromDataAnnotation = false);
abstract member ComplexProperty : Type * string * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexPropertyBuilder
Public Function ComplexProperty (propertyType As Type, propertyName As String, Optional complexType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionComplexPropertyBuilder
参数
- propertyType
- Type
属性将保留的值的类型。
- propertyName
- String
要配置的属性的名称。
- complexType
- Type
目标复杂类型。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
一个对象,如果属性存在于类型上,则可用于配置该属性, null
否则为 。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈