❔ ef core foreign key problem
how i need to configure the foreign keys for this situation?
4 Replies
well I would expect that the Player entity would have 2 lists, one to represent the bans the player has recieved, and one to represent the bans they've given out.
public List<Ban> Bans {get;set;}
and public List<Ban> GivenBans {get;set;}
then to configure itis there a solution without the lists?
I'd say configure them on the
Ban
entity
And configure the relationship with .HasOne(...).WithOne(...)
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.