IConventionEntityTypeBuilder.GetOrCreateProperties Method

Definition

Overloads

GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean)

Returns the existing properties matching the given members or creates them.

GetOrCreateProperties(IReadOnlyList<String>, Boolean)

Returns the existing properties with the given names or creates them if matching CLR members are found.

GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean)

Returns the existing properties matching the given members or creates them.

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> GetOrCreateProperties (System.Collections.Generic.IEnumerable<System.Reflection.MemberInfo> memberInfos, bool fromDataAnnotation = false);
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)

Parameters

memberInfos
IEnumerable<MemberInfo>

The type members.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

A list of properties if they exist on the entity type, null otherwise.

Applies to

GetOrCreateProperties(IReadOnlyList<String>, Boolean)

Returns the existing properties with the given names or creates them if matching CLR members are found.

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> GetOrCreateProperties (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
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)

Parameters

propertyNames
IReadOnlyList<String>

The names of the properties.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

A list of properties if they exist on the entity type, null otherwise.

Applies to