ConventionEntityTypeExtensions.SetDiscriminatorProperty Methode

Definition

Legt den fest, der IProperty zum Speichern eines Diskriminatorwerts verwendet wird.

public static void SetDiscriminatorProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.IConventionProperty SetDiscriminatorProperty (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property, bool fromDataAnnotation = false);
static member SetDiscriminatorProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty * bool -> unit
static member SetDiscriminatorProperty : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionProperty
<Extension()>
Public Sub SetDiscriminatorProperty (entityType As IConventionEntityType, property As IProperty, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetDiscriminatorProperty (entityType As IConventionEntityType, property As IProperty, Optional fromDataAnnotation As Boolean = false) As IConventionProperty

Parameter

entityType
IConventionEntityType

Der Entitätstyp.

property
IProperty

Die festzulegende Eigenschaft.

fromDataAnnotation
Boolean

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

Gibt zurück

Die Diskriminatoreigenschaft.

Gilt für: