I'm a bit of a loss here.
Basically I have these two Models:
public class Player
{
public int PlayerId { get; set; }
public string Name { get; set; }
public virtual ICollection<Game> Games { get; set; }
}
public class Game
{
public int GameId { get; set; }
public virtual Player PlayerBlack { get; set; }
public virtual Player PlayerWhite { get; set; }
}
Now the Database Schema EF Code First creates for me is not correct because the Game table gets 3 Foreign Keys (Playerblack, PlayerWhite and Player) instead of 2.
So how can I tie these Models together so that EF understands that the Players Games are found by either looking at the Black or White Player.
Is it even possible?