Idioma

SqlServerPropertyBuilderExtensions.IsHidden Method

Definition

Configures whether the property's column is defined with the SQL Server HIDDEN flag, which excludes the column from SELECT * results. This applies to generated columns such as temporal table period columns.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? IsHidden(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, bool? hidden, bool fromDataAnnotation = false);
static member IsHidden : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
<Extension()>
Public Function IsHidden (propertyBuilder As IConventionPropertyBuilder, hidden As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

hidden
Nullable<Boolean>

A value indicating whether the property's column is hidden.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

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

Remarks

See Using SQL Server temporal tables with EF Core for more information and examples.

Applies to