返回匿名linq连接中的所有列
本文关键字:连接 linq 返回 | 更新日期: 2023-09-27 18:02:19
如何返回以下匿名linq连接中的所有列:
var results = (from t in Table1.AsEnumerable() join t2 in Table2.AsEnumerable()
on t.Field<string>("id") equals t2.Field<string>("id")
into allcol from rows in allcol
select rows);
我得到允许行从Table2
,没有行从Table1
var results = (from t in Table1.AsEnumerable()
join t2 in Table2.AsEnumerable()
on t.Field<string>("id")
equals t2.Field<string>("id")
into allcol
from rows in allcol
select new {table1=t,table2=rows});