pwnage
pwnage
CC#
Created by pwnage on 1/19/2023 in #help
❔ Preventing over-allocation over limit in database with lots of concurrent requests?
blockchain
6 replies
CC#
Created by pwnage on 10/2/2022 in #help
Drop composite PK and add new column PK with identity with EF Code first
but i get following error: The seed entity for entity type 'ClaimFeeType' cannot be added because a non-zero value is required for property 'ClaimFeeTypeId'. Consider providing a negative value to avoid collisions with non-seed data.
3 replies
CC#
Created by pwnage on 10/2/2022 in #help
Drop composite PK and add new column PK with identity with EF Code first
I've tried something like this,
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(name: "PK_ClaimFeeType", "ClaimFeeType");
migrationBuilder.AddColumn<int>(
name: "ClaimFeeTypeId",
table: "ClaimFeeType",
type: "int",
nullable: false);

migrationBuilder.AddPrimaryKey(name: "PK_ClaimFeeTypeId", table: "ClaimFeeType", column: "ClaimFeeTypeId");
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(name: "PK_ClaimFeeType", "ClaimFeeType");
migrationBuilder.AddColumn<int>(
name: "ClaimFeeTypeId",
table: "ClaimFeeType",
type: "int",
nullable: false);

migrationBuilder.AddPrimaryKey(name: "PK_ClaimFeeTypeId", table: "ClaimFeeType", column: "ClaimFeeTypeId");
3 replies