Share via


IConventionPropertyBuilder.HasSentinel(Object, Boolean) Method

Definition

Configures the value that will be used to determine if the property has been set or not. If the property is set to the sentinel value, then it is considered not set. By default, the sentinel value is the CLR default value for the type of the property.

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

Parameters

sentinel
Object

The sentinel value.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Applies to