protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Login = table.Column<string>(nullable: false),
Password = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
}</string></string></int>
null value in column "Id" violates not-null constraint
Failed executing DbCommand (4ms) [Parameters=[@p0='?', @p1='?'], CommandType='Text', CommandTimeout='30']
INSERT INTO "Users" ("Login", "Password")
VALUES (@p0, @p1)
RETURNING "Id";
Find more questions by tags ASP.NETEntity FrameworkPostgreSQL