Compartir a través de


IConventionEntityType.AddIndexerProperty Método

Definición

Agrega una propiedad respaldada por e indexador a este tipo de entidad.

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

Parámetros

name
String

Nombre de la propiedad que se va a agregar.

propertyType
Type

Tipo de valor que contendrá la propiedad.

setTypeConfigurationSource
Boolean

Indica si se debe establecer el origen de configuración de tipo.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

Propiedad recién creada.

Se aplica a