Skip to content

Migrations Identity column

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

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

Adds support for identity columns in migrations. Available on both SQL Server and PostgreSQL.

Usage

migrationBuilder.AddColumn<int>("Id", "Customer")
                .AsIdentityColumn();

Clone this wiki locally