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
它们会自动添加。我删除了它们,但它将它们添加回来。 –