ConventionEntityTypeExtensions.SetDiscriminatorProperty Method

Definition

Sets the IProperty that will be used for storing a discriminator value.

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

Parameters

entityType
IConventionEntityType

The entity type.

property
IProperty

The property to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The discriminator property.

Applies to