Share via


SqlServerKeyBuilderExtensions.IsClustered Method

Definition

Overloads

IsClustered(KeyBuilder, Boolean)

Configures whether the key is clustered when targeting SQL Server.

IsClustered(IConventionKeyBuilder, Nullable<Boolean>, Boolean)

Configures whether the key is clustered when targeting SQL Server.

IsClustered<TEntity>(KeyBuilder<TEntity>, Boolean)

Configures whether the key is clustered when targeting SQL Server.

IsClustered(KeyBuilder, Boolean)

Configures whether the key is clustered when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder IsClustered (this Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder keyBuilder, bool clustered = true);
static member IsClustered : Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder
<Extension()>
Public Function IsClustered (keyBuilder As KeyBuilder, Optional clustered As Boolean = true) As KeyBuilder

Parameters

keyBuilder
KeyBuilder

The builder for the key being configured.

clustered
Boolean

A value indicating whether the key is clustered.

Returns

The same builder instance so that multiple calls can be chained.

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

IsClustered(IConventionKeyBuilder, Nullable<Boolean>, Boolean)

Configures whether the key is clustered when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder IsClustered (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder keyBuilder, bool? clustered, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder? IsClustered (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder keyBuilder, bool? clustered, bool fromDataAnnotation = false);
static member IsClustered : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionKeyBuilder
<Extension()>
Public Function IsClustered (keyBuilder As IConventionKeyBuilder, clustered As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionKeyBuilder

Parameters

keyBuilder
IConventionKeyBuilder

The builder for the key being configured.

clustered
Nullable<Boolean>

A value indicating whether the key is clustered.

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

IsClustered<TEntity>(KeyBuilder<TEntity>, Boolean)

Configures whether the key is clustered when targeting SQL Server.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder<TEntity> IsClustered<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder<TEntity> keyBuilder, bool clustered = true);
static member IsClustered : Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder<'Entity> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder<'Entity>
<Extension()>
Public Function IsClustered(Of TEntity) (keyBuilder As KeyBuilder(Of TEntity), Optional clustered As Boolean = true) As KeyBuilder(Of TEntity)

Type Parameters

TEntity

Parameters

keyBuilder
KeyBuilder<TEntity>

The builder for the key being configured.

clustered
Boolean

A value indicating whether the key is clustered.

Returns

KeyBuilder<TEntity>

The same builder instance so that multiple calls can be chained.

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