Skip to content

Instantly share code, notes, and snippets.

@SergioGeeK7
Created November 25, 2014 15:16
Show Gist options
  • Save SergioGeeK7/8e89ab43f0791c645cf7 to your computer and use it in GitHub Desktop.
Save SergioGeeK7/8e89ab43f0791c645cf7 to your computer and use it in GitHub Desktop.
from p in context.Periods
join f in context.Facts
on new {
id = p.periodid,
p.otherid
} equals new {
f.id,
f.otherid
} into fg
from fgi in fg.DefaultIfEmpty()
where p.companyid == 100
select f.value
from p in context.Periods
join f in context.Facts on p.id equals f.periodid into fg
from fgi in fg.Where(f => f.otherid == 17).DefaultIfEmpty()
where p.companyid == 100
select f.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment