共用方式為


IConventionTypeBaseBuilder.GetOrCreateProperties 方法

定義

多載

GetOrCreateProperties(IReadOnlyList<String>, Boolean)

傳回具有指定名稱的現有屬性,如果找到相符的 CLR 成員,請加以建立。

GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean)

傳回符合指定成員的現有屬性,或建立它們。

GetOrCreateProperties(IReadOnlyList<String>, Boolean)

傳回具有指定名稱的現有屬性,如果找到相符的 CLR 成員,請加以建立。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? GetOrCreateProperties (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member GetOrCreateProperties : System.Collections.Generic.IReadOnlyList<string> * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Function GetOrCreateProperties (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)

參數

propertyNames
IReadOnlyList<String>

屬性的名稱。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

如果屬性存在於類型上,則為屬性清單, null 否則為 。

適用於

GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean)

傳回符合指定成員的現有屬性,或建立它們。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? GetOrCreateProperties (System.Collections.Generic.IEnumerable<System.Reflection.MemberInfo>? memberInfos, bool fromDataAnnotation = false);
abstract member GetOrCreateProperties : seq<System.Reflection.MemberInfo> * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Function GetOrCreateProperties (memberInfos As IEnumerable(Of MemberInfo), Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)

參數

memberInfos
IEnumerable<MemberInfo>

類型成員。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

如果屬性存在於類型上,則為屬性清單, null 否則為 。

適用於