linq 多条件join

var query=from a in db.A
          join b in db.B.Where(c=>c.num>3)  
          on new {a.type,a.item} equals new {b.type,b.item} into g
          from b in g.DefaultIfEmpty()
          select new
          
             a,
             num=b==null?0:b.num, //这样来判断b表内是否有数据
            };
原文地址:https://www.cnblogs.com/lenther2002/p/4996378.html