select * from foo f left outer join bar b on b.Id = f.Id and b.Pid = 10 and b.Sid = 20
Dim query = (from f in foo group join b in bar on b.Id equals f.Id into g = Group from fb in g.where(function(x) x.Pid = 10 and x.Sid = 20).DefaultIfEmpty select new with {.Name = f.Name, .Id = (if fb isNot nothing, fb.Id, Nothing) }).ToList
from f in foo join b in bar on f equals b.Id into bs from b in bs.DefaultIfEmpty() where b.Pid = 10 and b.Sid = 20 select new { Name = f.Name, Id= f.id == null ? "Null" : f.id};
Dim query = (From f In foo Group Join b In bar.Where(Function(x) x.Pid = 10 And x.Sid=20) On b.Id Equals f.Id Into g = Group From fb In g.DefaultIfEmpty() Select New With {.Name = f.Name, .Id = (if fb isNot nothing, fb.Id, Nothing) }).ToList()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)