- var query=list.GroupBy(t=>new{t....分组字段})
- .Select(g=>
new {FROM=g.Key.From,TO=g.Key.To,NUM=g.Count(),Time=g.Key.Time,Body=string.Join(",",g.Select(s=>s.Body).ToArray())})
2var list=list.GroupBy(t=>new{ ...分组字段}).Select(p =>new 类 {属性=p.key.值,属性=string.Join(",",p.Select(s=>s.值).ToArray())}
标签:ToArray,list,一列,Key,new,多列,GroupBy,Select From: https://www.cnblogs.com/NewLift/p/16642222.html