Skip to content

Instantly share code, notes, and snippets.

@thnk2wn
Created November 18, 2013 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thnk2wn/7536950 to your computer and use it in GitHub Desktop.
Save thnk2wn/7536950 to your computer and use it in GitHub Desktop.
// left join as a safety precaution
jobAdPosts = (from b in SqlContext.JobBoards
join jap in SqlContext.JobAdPosts on new { JobBoardId = b.Id, JobAdId = vm.JobAd.Id } equals new { jap.JobBoardId, jap.JobAdId } into j1
from jap in j1.DefaultIfEmpty()
where b.IsActive
orderby b.SortOrder ascending
select jap).ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment