Skip to content

Migrations (Non )Clustered PK (SQL Server)

Pawel Gerr edited this page Nov 11, 2025 · 1 revision

This feature is using SQL Server capabilities.

Required Nuget Package: Thinktecture.EntityFrameworkCore.SqlServer

Usage

migrationBuilder.AddPrimaryKey("PK_Customers", "Customers", "Id")
                .IsClustered(true);

Clone this wiki locally