I have a table GameVersion with FK (allowing nulls) to Game table. When I do this:
GameVersion[] q = (from gv in db.GameVersion.Include("Game")
select gv).ToArray();
It works OK, while iterating GameVersion objects I can see null references to Game in some records (just like on the databse), so it works like left join.
However, when I slightly modify the query and add searching by game name
GameVersion[] q = (from gv in db.GameVersion.Include("Game")
where gv.Game.DisplayName.Contains("a")
select gv).ToArray();
It suddenly behaves like inner join (no longer selects null references). I don't quite understand this behaviour. Why is this happening and how do I make the query work? I want to select all GameVersions, even the ones with Game==null plus apply a condition on one of the Game columns.