var obj = model.Join(model2, x => x.Id, y => y.Id, (x , y) => new { x = x, y = y }).DefaultIfEmpty(); var obj1 = model.GroupJoin(model2, x => x.Id, y => y.Id, (x, y) => new { x = x, y = y }); var obj11 = from x in model join y in model2 on x.Id equals y.Id into oj from o in oj.DefaultIfEmpty() select new { x = x, y = o };
我想要的是 obj11的效果,可以直接一层foreach 对象里面的值;
into一下?