IConventionEntityTypeBuilder.CanHaveProperty Method

Definition

Overloads

CanHaveProperty(MemberInfo, Boolean)

Returns a value indicating whether the given property can be added to this entity type.

CanHaveProperty(Type, String, Boolean)

Returns a value indicating whether the given property can be added to this entity type.

CanHaveProperty(MemberInfo, Boolean)

Returns a value indicating whether the given property can be added to this entity type.

public bool CanHaveProperty (System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
abstract member CanHaveProperty : System.Reflection.MemberInfo * bool -> bool
Public Function CanHaveProperty (memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

memberInfo
MemberInfo

The PropertyInfo or FieldInfo of the property.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the property can be added.

Applies to

CanHaveProperty(Type, String, Boolean)

Returns a value indicating whether the given property can be added to this entity type.

public bool CanHaveProperty (Type? propertyType, string propertyName, bool fromDataAnnotation = false);
abstract member CanHaveProperty : Type * string * bool -> bool
Public Function CanHaveProperty (propertyType As Type, propertyName As String, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

propertyType
Type

The type of value the property will hold.

propertyName
String

The name of the property to be configured.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the property can be added.

Applies to