Skip to content

Migrations Include columns

Pawel Gerr edited this page Feb 16, 2026 · 3 revisions

Required Nuget Package:
Thinktecture.EntityFrameworkCore.SqlServer
Thinktecture.EntityFrameworkCore.PostgreSQL [EXPERIMENTAL]

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