ConventionEntityTypeExtensions.AddProperty Methode

Definition

Überlädt

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

AddProperty(IConventionEntityType, String, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

AddProperty(IConventionEntityType, String, Type, Boolean, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

AddProperty(IConventionEntityType, MemberInfo, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Parameter

entityType
IConventionEntityType

Der Entitätstyp.

memberInfo
MemberInfo

Der entsprechende Member in der Entitätsklasse.

fromDataAnnotation
Boolean

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

Gibt zurück

Die neu erstellte Eigenschaft.

Gilt für:

AddProperty(IConventionEntityType, String, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Function AddProperty (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Parameter

entityType
IConventionEntityType

Der Entitätstyp.

name
String

Der Name der hinzuzufügenden Eigenschaft.

fromDataAnnotation
Boolean

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

Gibt zurück

Die neu erstellte Eigenschaft.

Gilt für:

AddProperty(IConventionEntityType, String, Type, Boolean, Boolean)

Fügt diesem Entitätstyp eine Eigenschaft hinzu.

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

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: