Entity Framework DB first - link table joining to two foreign tables
0
Current project uses Entity Framework DB first. I've been given a requirement which involves storing access credentials to third-party sites. The entity structure would look something like this: public class ThirdParty { int Id { get; set; } string Name {get; set;} string RootUrl { get; set;} } public class ThirdPartyCredential { int Id { get; set; } int ThirdPartyId { get; set; } string Username { get; set; } string Password { get; set; } // additional FK's } The "additional" keys is where I'm struggling. We have two other tables called Account and Organisation : each account belongs to one organisation. But the credentials can exist at either the account or organisation level. I need my ThirdPartyCredential table to link to both. I do...