Skip to content
Discussion options

You must be logged in to vote

Hello All,
Here is the solution to Lamda multiple outer join syntax. This has two joins to get who enter the notes and who put the record on hold.

public Task GetAsync(string pchgDate, string pEngID)
{
var data = _context.BookChanges
.GroupJoin(_context.LookUpUsers, p => p.NotesBy, n => n.UserName, (p, n) => new { p, n })
.SelectMany(p => p.n.DefaultIfEmpty(), (p, n) => new { p.p, n })
.GroupJoin(_context.LookUpUsers, pn => pn.p.HoldBy, h => h.UserName, (pn, h) => new { pn, h })
.SelectMany(pnh => pnh.h.DefaultIfEmpty(), (pnh, h) => new { pnh,h})
.Where(x => x.pnh.pn.p.PchgDate == pPchgDate && x.pnh.pn.p.EngID == pEngID)
.Select(s => new BookChangeEntity
{
BookChangeID = s.pnh.pn.p.BookCh…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jhuerta3
Comment options

Comment options

You must be logged in to vote
1 reply
@Chicagoan2016
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jhuerta3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants