0
我從Web服務調用以下函數,但無法獲取定義的對象。linq union group by undefined
Dim x = (From a In _db.report _
Select ep = a.CurrentReport, CuCy = a.Current_Cycle) _
.Union _
(From b In _db.Counts _
Group b By b.Year, b.Report Into k() _ <--------(this is undefined)
Select ep = b.Report, CucY = b.Year).ToList().Take(10)
這是通過聯合查詢進行分組的正確方法嗎?
我將不勝感激任何幫助。
我不是完全肯定這一點,但我認爲'k'後面的括號不需要:'Group By [...] k選擇[012]''''''' – GolfWolf
它們會自動添加。我刪除了它們,但它將它們添加回來。 –