Share via


ConventionEntityTypeExtensions.AddIndexerProperty Metodo

Definizione

Aggiunge una proprietà supportata da e indicizzatore a questo tipo di entità.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddIndexerProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
static member AddIndexerProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddIndexerProperty (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