我有以下查询,我试图通过 TCount 获得 TopicCounts 的前 4 个:
var bygroup = (from element in inputSplit
group element by element.Text into groups
from win in groups.TumblingWindow(TimeSpan.FromSeconds(10))
select new TopicCounts
{
Topic = groups.Key,
TCount = win.Count(),
Score = win.Avg(element => element.Sen)
}
).OrderByDescending(x => x.TCount).Distinct().Take(4);
每当我尝试构建时,我都会收到以下错误:
“Microsoft.ComplexEventProcessing.Linq.IQStreamable”不包含“OrderByDescending”的定义,并且没有扩展方法“OrderByDescending”接受类型的第一个参数
可以找到“Microsoft.ComplexEventProcessing.Linq.IQStreamable”(您是否缺少 using 指令或程序集引用?)
我错过了什么?