LINQ Dataset Join on not equals如何实现
select a.id,a.v1,a.num,a.m1,a.m2,a.m3 from
(select t1.id,t1.v1,t2.num,t2.m1,t2.m2,t2.m3 from t1 inner join t2 on t1.id=t2.id
union all
select t1.id,t1.v1,t2.num,null as m1,null as m2,null as m3 from t1 inner join t2 on t1.id<>t2.id
) a
order by a.num,a.id
以上如果用LINQ Dataset如何实现?请各位高手协助,关键是not equals不支持,如何实现?
------解决方案--------------------可以这样:
from t1 in db.T1
from t2 in db.T2
where t1.id != t2.id
select t1;