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

适用于