Share via


ConventionEntityTypeExtensions.AddProperty Metodo

Definizione

Overload

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Aggiunge una proprietà a questo tipo di entità.

AddProperty(IConventionEntityType, String, Boolean)

Aggiunge una proprietà a questo tipo di entità.

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

Aggiunge una proprietà a questo tipo di entità.

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Aggiunge una proprietà a questo tipo di 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

Parametri

entityType
IConventionEntityType

Tipo di entità.

memberInfo
MemberInfo

Membro corrispondente nella classe di entità.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata usando un'annotazione dati.

Restituisce

Proprietà appena creata.

Si applica a

AddProperty(IConventionEntityType, String, Boolean)

Aggiunge una proprietà a questo tipo di 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

Parametri

entityType
IConventionEntityType

Tipo di entità.

name
String

Nome della proprietà da aggiungere.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata usando un'annotazione dati.

Restituisce

Proprietà appena creata.

Si applica a

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

Aggiunge una proprietà a questo tipo di 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

Parametri

entityType
IConventionEntityType

Tipo di entità.

name
String

Nome della proprietà da aggiungere.

propertyType
Type

Il tipo di valore che la proprietà conterrà.

setTypeConfigurationSource
Boolean

Indica se l'origine di configurazione del tipo deve essere impostata.

fromDataAnnotation
Boolean

Indica se la configurazione è stata specificata usando un'annotazione dati.

Restituisce

Proprietà appena creata.

Si applica a