SqlServerIndexBuilderExtensions.UseDataCompression 方法

定義

多載

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

設定以SQL Server為目標時,是否使用資料壓縮選項建立索引。

UseDataCompression(IndexBuilder, DataCompressionType)

設定以SQL Server為目標時,是否使用資料壓縮選項建立索引。

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

設定以SQL Server為目標時,是否使用資料壓縮選項建立索引。

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

設定以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

參數

indexBuilder
IConventionIndexBuilder

要設定之索引的產生器。

dataCompressionType
Nullable<DataCompressionType>

值,指出要使用的資料壓縮選項。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

如果已套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於

UseDataCompression(IndexBuilder, DataCompressionType)

設定以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

參數

indexBuilder
IndexBuilder

要設定之索引的產生器。

dataCompressionType
DataCompressionType

值,指出要使用的資料壓縮選項。

傳回

進一步設定索引的建置器。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於

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

設定以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)

類型參數

TEntity

參數

indexBuilder
IndexBuilder<TEntity>

要設定之索引的產生器。

dataCompressionType
DataCompressionType

值,指出要使用的資料壓縮選項。

傳回

IndexBuilder<TEntity>

進一步設定索引的建置器。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於