如何返回以下匿名linq join中的所有列:
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
答案 0 :(得分:1)
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});
我希望这会有所帮助。