Skip to content

Instantly share code, notes, and snippets.

@vlapenkov
Created February 11, 2025 13:55
Show Gist options
  • Save vlapenkov/be0d2c43d95d27dae525e63bd127ce63 to your computer and use it in GitHub Desktop.
Save vlapenkov/be0d2c43d95d27dae525e63bd127ce63 to your computer and use it in GitHub Desktop.
DefaultIfEmpty
var query =
from artId in artIds
join artIdArticle in _dbContext.DetArticle.Select(p => p.Artid)
on artId equals artIdArticle into outer
from itemArticle in outer.DefaultIfEmpty()
select new { artId, itemArticle };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment