Skip to content

Instantly share code, notes, and snippets.

@e23z
Last active August 7, 2017 21:24
Show Gist options
  • Save e23z/0c240aff398e38fd94c6eef099f4b6ba to your computer and use it in GitHub Desktop.
Save e23z/0c240aff398e38fd94c6eef099f4b6ba to your computer and use it in GitHub Desktop.
[Linq left outer join] #linq #csharp #entityframework #database
from table1 in _repository1
join table2 in _repository2 on table1.column equals table2.column into tmp
where table1.column == null
select new { Object1 = table1, Object2 = tmp.DefaultIfEmpty( ).FirstOrDefault( ) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment