SqlServerPropertyBuilderExtensions.CanSetIsSparse Method

Definition

Returns a value indicating whether the property's column can be configured as sparse when targeting SQL Server.

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

Parameters

property
IConventionPropertyBuilder

The builder for the property being configured.

sparse
Nullable<Boolean>

A value indicating whether the property's column is created as sparse.

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 Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples. Also see Sparse columns for general information on SQL Server sparse columns.

Applies to