Share via


SqlServerPropertyBuilderExtensions.IsSparse Method

Definition

Overloads

IsSparse(PropertyBuilder, Boolean)

Configures whether the property's column is created as sparse when targeting SQL Server.

IsSparse(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

Configures whether the property's column is created as sparse when targeting SQL Server.

IsSparse<TProperty>(PropertyBuilder<TProperty>, Boolean)

Configures whether the property's column is created as sparse when targeting SQL Server.

IsSparse(PropertyBuilder, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

Configures whether the property's column is created as sparse when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder IsSparse (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, bool sparse = true);
static member IsSparse : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function IsSparse (propertyBuilder As PropertyBuilder, Optional sparse As Boolean = true) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

sparse
Boolean

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

Returns

A builder to further configure the property.

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

IsSparse(IConventionPropertyBuilder, Nullable<Boolean>, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

Configures whether the property's column is created as sparse when targeting SQL Server.

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

Parameters

propertyBuilder
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

IsSparse<TProperty>(PropertyBuilder<TProperty>, Boolean)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

Configures whether the property's column is created as sparse when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> IsSparse<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, bool sparse = true);
static member IsSparse : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function IsSparse(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), Optional sparse As Boolean = true) As PropertyBuilder(Of TProperty)

Type Parameters

TProperty

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

sparse
Boolean

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

Returns

A builder to further configure the property.

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