I am having an issue, where .NETCore isn't dedicating my primary keys on scaffolding. I am getting this error "Could not scaffold the foreign key 'Parent2(SKU2,ID2)'. A key for 'SKU,ID' was not found in the principal entity type 'Parent'."
Here is the code to create my table
CREATE TABLE `Parent` (
`OBJ` int,
`SKU` varchar(255),
`ID` int,
PRIMARY KEY (`OBJ`),
KEY `FK` (`SKU`, `ID`)
);
CREATE TABLE `Child` (
`IDC` int,
`SKU` varchar(255),
`ID` int,
PRIMARY KEY (`IDC`),
KEY `FK` (`SKU`, `ID`)
);
All I want to do is link the child to parent using the SKU, so if the SKU changes, it will change on the child too.