Share via


IConventionEntityType.AddIndexerProperty Metodo

Definizione

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

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionProperty? AddIndexerProperty (string name, Type propertyType, bool setTypeConfigurationSource = true, bool fromDataAnnotation = false);
abstract member AddIndexerProperty : string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
override this.AddIndexerProperty : string * Type * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
Public Overridable Function AddIndexerProperty (name As String, propertyType As Type, Optional setTypeConfigurationSource As Boolean = true, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Parametri

name
String

Nome della proprietà da aggiungere.

propertyType
Type

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 utilizzando un'annotazione dati.

Restituisce

Proprietà appena creata.

Si applica a