请指导,我可以使用 Dynamic Group by,但是在选择非聚合字段时,我收到以下错误
类型“IGrouping`2”中不存在属性或字段“名称”
var result311 = (IQueryable)gle1.temptable.Where(a => a.IsAllowed == false && a.Code == "r01");
var result = result311.GroupBy("new (name, FirstAmountOriginal, SecondAccounting)", "it")
.Select("new (it.name,Sum(FirstAmountOriginal) as FirstAmountOriginalx, Sum(SecondAccounting) as SecondAccountingx)");
请指导