我想用linq编写此查询。请帮忙!!!
select * from TableA a
join Table B b
on a.ID = b.ID
left join TableC c
on b.ID=c.ID or b.ID = c.Text
答案 0 :(得分:0)
您不需要总是加入。
var result = from a in TableA
from b in TableB
from c in TableC
where a.ID == b.ID && b.ID = c.ID || b.ID == c.Text