Trying to apply TPT inheritance in EF Core 5, using an existing schema. How can I specify the foreign key column name of the child table, if the column name does not exactly match the parent table? In the documentation example, we would not have Pets.Id, but Pets.PetId:
CREATE TABLE [Animals] (
[Id] int NOT NULL IDENTITY,
[Species] nvarchar(max) NULL,
CONSTRAINT [PK_Animals] PRIMARY KEY ([Id])
);
CREATE TABLE [Pets] (
*[PetId] int NOT NULL*,
[Name] nvarchar(max) NULL,
CONSTRAINT [PK_Pets] PRIMARY KEY ([PetId]),
CONSTRAINT [FK_Pets_Animals_Id] FOREIGN KEY ([PetId]) REFERENCES [Animals] ([Id]) ON DELETE NO ACTION
);