SqlServerIndexBuilderExtensions.CanSetDataCompression Method

Definition

Returns a value indicating whether the index can be configured with data compression option when targeting SQL Server.

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

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