var z = from x in resp1.table1
join y in resp2.table2 on x.fields equals y.fields
select
new {y.fields, y.fields1, x.fields2, x.fields3, x.fields4};
而且我想要一张新桌子,所以基本上我想加入三个或更多桌子,但我不知道如何
var z = from x in resp1.table1
join y in resp2.table2 on x.fields equals y.fields
join z in resp3.table3 on x.fields equals z.fields
select
new {y.fields, y.fields1, x.fields2, x.fields3, x.fields4, z.fields5, z.fields6};
依此类推...但首先检查您是否真的需要三重连接!
var z = from x in resp1.table1
join y in resp2.table2 on x.fields equals y.fields
join z in resp3.table3 on x.fields equals z.fields
select
new {y.fields, y.fields1, x.fields2, x.fields3, x.fields4, z.fields5};