Share via


SqlServerIndexBuilderExtensions.UseDataCompression Method

Definition

Overloads

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

Configures whether the index is created with data compression option when targeting SQL Server.

UseDataCompression(IndexBuilder, DataCompressionType)

Configures whether the index is created with data compression option when targeting SQL Server.

UseDataCompression<TEntity>(IndexBuilder<TEntity>, DataCompressionType)

Configures whether the index is created with data compression option when targeting SQL Server.

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

Configures whether the index is created with data compression option when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder? UseDataCompression (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, Microsoft.EntityFrameworkCore.DataCompressionType? dataCompressionType, bool fromDataAnnotation = false);
static member UseDataCompression : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * Nullable<Microsoft.EntityFrameworkCore.DataCompressionType> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder
<Extension()>
Public Function UseDataCompression (indexBuilder As IConventionIndexBuilder, dataCompressionType As Nullable(Of DataCompressionType), Optional fromDataAnnotation As Boolean = false) As IConventionIndexBuilder

Parameters

indexBuilder
IConventionIndexBuilder

The builder for the index being configured.

dataCompressionType
Nullable<DataCompressionType>

A value indicating the data compression option to be used.

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.

Applies to

UseDataCompression(IndexBuilder, DataCompressionType)

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

Configures whether the index is created with data compression option when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder UseDataCompression (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, Microsoft.EntityFrameworkCore.DataCompressionType dataCompressionType);
static member UseDataCompression : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * Microsoft.EntityFrameworkCore.DataCompressionType -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function UseDataCompression (indexBuilder As IndexBuilder, dataCompressionType As DataCompressionType) As IndexBuilder

Parameters

indexBuilder
IndexBuilder

The builder for the index being configured.

dataCompressionType
DataCompressionType

A value indicating the data compression option to be used.

Returns

A builder to further configure the index.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

UseDataCompression<TEntity>(IndexBuilder<TEntity>, DataCompressionType)

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

Configures whether the index is created with data compression option when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> UseDataCompression<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, Microsoft.EntityFrameworkCore.DataCompressionType dataCompressionType);
static member UseDataCompression : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * Microsoft.EntityFrameworkCore.DataCompressionType -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function UseDataCompression(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), dataCompressionType As DataCompressionType) As IndexBuilder(Of TEntity)

Type Parameters

TEntity

Parameters

indexBuilder
IndexBuilder<TEntity>

The builder for the index being configured.

dataCompressionType
DataCompressionType

A value indicating the data compression option to be used.

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to