Skip to content

Migrations Include columns

Pawel Gerr edited this page Mar 4, 2026 · 5 revisions

Required Nuget Package:
Thinktecture.EntityFrameworkCore.SqlServer
Thinktecture.EntityFrameworkCore.PostgreSQL

Adds support for covering indexes with INCLUDE columns in migrations. Available on both SQL Server and PostgreSQL.

Usage

migrationBuilder.CreateIndex("IX_OrderItems_ProductId", "OrderItems", "ProductId")
                .IncludeColumns("OrderId", "Count");

Clone this wiki locally