下面是我的 LINQ 查询:
Dim JoinedResult = From t1 In temp.AsEnumerable() _
Group Join t2 In tbCity.AsEnumerable() _
On t1.Field(Of String)("City") Equals t2.Field(Of String)("city_name") _
Into RightTableResults = Group _
From t In RightTableResults.DefaultIfEmpty
Select New With
{
.ID = t1.Item("ID"),
.CID = If(t Is Nothing,
1,
t.Item("city_gid"))
}
如何将值从“JoinedResult”复制到数据表?
笔记:
- 我没有得到
JoinedResult.CopyToDataTable()
- 我不想使用循环