var q = from g in BLLFactory.GroupBLL.LoadEntities(u => true) join u in BLLFactory.memberDetailsBLL.LoadEntities(u => true) on g.code equals u.user_name
var q = from g in BLLFactory.GroupBLL.LoadEntities(u => true) join u in BLLFactory.memberDetailsBLL.LoadEntities(u => true) on g.code equals u.user_name;
q.Union(from g in BLLFactory.GroupBLL.LoadEntities(u => true) where g.code is null);
var q = from g in BLLFactory.GroupBLL.LoadEntities(u => true) join u in BLLFactory.memberDetailsBLL.LoadEntities(u => true) on g.code equals u.user_name
where g.code.equals("null") select *;
好久没linq了,大概是这样,试试
不行,加个where就是在原有的基础上在筛选,我是希望除了原有的数据以外也能获得g.code 为null的数据
左连接