ConventionEntityTypeExtensions.AddIndexerProperty Methode

Definition

Fügt diesem Entitätstyp eine eigenschaft hinzu, die von und indexer unterstützt wird.

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

Parameter

entityType
IConventionEntityType

Der Entitätstyp.

name
String

Der Name der hinzuzufügenden Eigenschaft.

propertyType
Type

Der Werttyp, den die Eigenschaft enthält.

setTypeConfigurationSource
Boolean

Gibt an, ob die Typkonfigurationsquelle festgelegt werden soll.

fromDataAnnotation
Boolean

Gibt an, ob die Konfiguration mithilfe einer Datenanmerkung angegeben wurde.

Gibt zurück

Die neu erstellte Eigenschaft.

Gilt für: