IConventionDiscriminatorBuilder.HasValue 方法

定义

重载

HasValue(Object, Boolean)

配置要使用的鉴别器值。

HasValue(IConventionEntityType, Object, Boolean)

配置要用于给定类型的实体的鉴别器值。

HasValue(Object, Boolean)

Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs

配置要使用的鉴别器值。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder HasValue (object value, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder? HasValue (object? value, bool fromDataAnnotation = false);
abstract member HasValue : obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder
Public Function HasValue (value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionDiscriminatorBuilder

参数

value
Object

鉴别器值。

fromDataAnnotation
Boolean

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

返回

同一生成器,以便可以链接多个调用。

适用于

HasValue(IConventionEntityType, Object, Boolean)

Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs
Source:
IConventionDiscriminatorBuilder.cs

配置要用于给定类型的实体的鉴别器值。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder HasValue (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, object value, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder? HasValue (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, object? value, bool fromDataAnnotation = false);
abstract member HasValue : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDiscriminatorBuilder
Public Function HasValue (entityType As IConventionEntityType, value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionDiscriminatorBuilder

参数

entityType
IConventionEntityType

要为其设置鉴别器值的实体类型。

value
Object

鉴别器值。

fromDataAnnotation
Boolean

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

返回

同一生成器,以便可以链接多个调用。

适用于