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 否則為 。

適用於