例如:

var sums = modellist
.GroupBy(x => x.userId)
.Select(group => new
{
Peo = group.Key,
fist = group.First()

}).ToList();

 

解析:

GroupBy后面用Select;

则:循环每一个分组进行select

相关文章:

  • 2022-12-23
  • 2021-08-29
  • 2022-02-18
  • 2022-12-23
  • 2022-01-14
  • 2021-05-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-09
  • 2021-09-20
相关资源
相似解决方案