Share via


IConventionEntityType.FindProperty Method

Definition

Overloads

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 on the given entity type. 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.

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

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

FindProperty(MemberInfo)

Gets a property on the given entity type. Returns null if no property is found.

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

Parameters

memberInfo
MemberInfo

The property 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