.NET Core 2.2:
I have a table-per-hierarchy (TPH) inheritance and I have customer and agent as inheriting from membership. Now I try and create a purchase order and want to add both their membership Ids as foreign keys but I can't, because that would mean putting MemberID twice as foreign keys in my code first model:
[ForeignKey("CustomerModel")]
public string MemberId { get; set; }
[ForeignKey("AgentModel")]
public string MemberId { get; set; }
Do I have to split these into two tables instead of using inheritance? Can I just rename one of these from MemberId to AgentID for example or does it need to match the foreign key's name?