IConventionEntityType.AddServiceProperty Method

Definition

Overloads

AddServiceProperty(MemberInfo, Type, Boolean)

Adds a service property to this entity type.

AddServiceProperty(MemberInfo, Boolean)

Adds a service property to this entity type.

AddServiceProperty(MemberInfo, Type, Boolean)

Adds a service property to this entity type.

public Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, Type? serviceType = default, bool fromDataAnnotation = false);
abstract member AddServiceProperty : System.Reflection.MemberInfo * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional serviceType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionServiceProperty

Parameters

memberInfo
MemberInfo

The PropertyInfo or FieldInfo of the property to add.

serviceType
Type

The type of the service, or null to use the type of the member.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created service property.

Applies to

AddServiceProperty(MemberInfo, Boolean)

Adds a service property to this entity type.

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

Parameters

memberInfo
MemberInfo

The PropertyInfo or FieldInfo of the property to add.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The newly created service property.

Applies to