ConventionEntityTypeExtensions.AddProperty Méthode

Définition

Surcharges

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Ajoute une propriété à ce type d’entité.

AddProperty(IConventionEntityType, String, Boolean)

Ajoute une propriété à ce type d’entité.

AddProperty(IConventionEntityType, String, Type, Boolean, Boolean)

Ajoute une propriété à ce type d’entité.

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Ajoute une propriété à ce type d’entité.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Paramètres

entityType
IConventionEntityType

Type d'entité.

memberInfo
MemberInfo

Membre correspondant sur la classe d’entité.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Propriété nouvellement créée.

S’applique à

AddProperty(IConventionEntityType, String, Boolean)

Ajoute une propriété à ce type d’entité.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Paramètres

entityType
IConventionEntityType

Type d'entité.

name
String

Nom de la propriété à ajouter.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Propriété nouvellement créée.

S’applique à

AddProperty(IConventionEntityType, String, Type, Boolean, Boolean)

Ajoute une propriété à ce type d’entité.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, name As String, propertyType As Type, Optional setTypeConfigurationSource As Boolean = true, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Paramètres

entityType
IConventionEntityType

Type d'entité.

name
String

Nom de la propriété à ajouter.

propertyType
Type

Type de valeur que la propriété contiendra.

setTypeConfigurationSource
Boolean

Indique si la source de configuration de type doit être définie.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Propriété nouvellement créée.

S’applique à