IReadOnlyEntityType.FindProperty Method

Definition

Overloads

FindProperty(MemberInfo)

Gets a property with the given member info. Returns null if no property is found.

FindProperty(String)

Gets the property with a given name. Returns null if no property with the given name is defined.

FindProperty(MemberInfo)

Gets a property with the given member info. Returns null if no property is found.

public virtual Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty? FindProperty (System.Reflection.MemberInfo memberInfo);
abstract member FindProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty
override this.FindProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty
Public Overridable Function FindProperty (memberInfo As MemberInfo) As IReadOnlyProperty

Parameters

memberInfo
MemberInfo

The member on the entity class.

Returns

The property, or null if none is found.

Remarks

This API only finds scalar properties and does not find navigation properties. Use FindNavigation(MemberInfo) to find a navigation property.

Applies to

FindProperty(String)

Gets the property with a given name. Returns null if no property with the given name is defined.

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty? FindProperty (string name);
abstract member FindProperty : string -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty
Public Function FindProperty (name As String) As IReadOnlyProperty

Parameters

name
String

The name of the property.

Returns

The property, or null if none is found.

Remarks

This API only finds scalar properties and does not find navigation properties. Use FindNavigation(String) to find a navigation property.

Applies to