ConventionEntityTypeExtensions.SetDiscriminatorProperty 方法

定義

IProperty設定將用於儲存鑒別子值的 。

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

參數

entityType
IConventionEntityType

實體類型。

property
IProperty

要設定的屬性。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

鑒別子屬性。

適用於