IEnumerable<OrderedArticle>但
IEnumerable<IGrouping<string,OrderedArticle>>
您需要更改代码以使用
a.Key:
var sells = orderedArt .GroupBy(a => a.ArticleName) .Select(a => new { Amount = a.Sum(b => b.ArticleAmount), Name = a.Key}) .OrderByDescending(a => a.Amount) .ToList();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)