Share via


IConventionDiscriminatorBuilder.HasValue Method

Definition

Overloads

HasValue(Object, Boolean)

Configures the discriminator value to use.

HasValue(IConventionEntityType, Object, Boolean)

Configures the discriminator value to use for entities of the given type.

HasValue(Object, Boolean)

Configures the discriminator value to use.

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

Parameters

value
Object

The discriminator value.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder so that multiple calls can be chained.

Applies to

HasValue(IConventionEntityType, Object, Boolean)

Configures the discriminator value to use for entities of the given type.

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

Parameters

entityType
IConventionEntityType

The entity type for which a discriminator value is being set.

value
Object

The discriminator value.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder so that multiple calls can be chained.

Applies to