Share via


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

指示是否使用数据注释指定配置。

返回

鉴别器属性。

适用于