IConventionTypeBaseBuilder.ComplexProperty 方法

定义

重载

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 否则为 。

适用于