我有这个 LINQ 查询:
var query = from row in context.data_vault
group row by row.STATE into g
select new {
State = g.Key,
Count = g.Sum(row => row.SCORE),
Phones = g.Count(c => c.PHONE)
};
执行时,我收到以下错误:
无法在 g.Count(c => c.PHONE) 处将类型“字符串”隐式转换为“布尔”