Share via


MutableEntityTypeExtensions.GetOrAddProperty Metodo

Definizione

Overload

GetOrAddProperty(IMutableEntityType, PropertyInfo)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

GetOrAddProperty(IMutableEntityType, String, Type)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

GetOrAddProperty(IMutableEntityType, String, Type, Boolean)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

GetOrAddProperty(IMutableEntityType, PropertyInfo)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty GetOrAddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.PropertyInfo propertyInfo);
static member GetOrAddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.PropertyInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function GetOrAddProperty (entityType As IMutableEntityType, propertyInfo As PropertyInfo) As IMutableProperty

Parametri

entityType
IMutableEntityType

Tipo di entità a cui ottenere o aggiungere la proprietà.

propertyInfo
PropertyInfo

Proprietà corrispondente nella classe di entità.

Restituisce

Proprietà esistente o appena creata.

Commenti

La proprietà restituita potrebbe non avere il tipo specificato.

Si applica a

GetOrAddProperty(IMutableEntityType, String, Type)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty GetOrAddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name, Type propertyType);
static member GetOrAddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function GetOrAddProperty (entityType As IMutableEntityType, name As String, propertyType As Type) As IMutableProperty

Parametri

entityType
IMutableEntityType

Tipo di entità a cui ottenere o aggiungere la proprietà.

name
String

Nome della proprietà.

propertyType
Type

Il tipo di valore che la proprietà conterrà.

Restituisce

Proprietà esistente o appena creata.

Commenti

La proprietà restituita potrebbe non avere il tipo specificato.

Si applica a

GetOrAddProperty(IMutableEntityType, String, Type, Boolean)

Ottiene la proprietà con il nome specificato oppure crea una nuova se non è già definita.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty GetOrAddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name, Type propertyType, bool shadow);
static member GetOrAddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function GetOrAddProperty (entityType As IMutableEntityType, name As String, propertyType As Type, shadow As Boolean) As IMutableProperty

Parametri

entityType
IMutableEntityType

Tipo di entità a cui ottenere o aggiungere la proprietà.

name
String

Nome della proprietà.

propertyType
Type

Il tipo di valore che la proprietà conterrà.

shadow
Boolean

Indica se la proprietà è in stato shadow.

Restituisce

Proprietà esistente o appena creata.

Commenti

La proprietà restituita potrebbe non avere il tipo e l'ombreggiatura specificati.

Si applica a