Summing a value inside of a Anonymous Type
问题 I have this in my code: var pRating = ctx.PrProjectRating .Where(x => x.PrIsDeleted == false) .Select(k => k) .GroupBy(g => new {g.PrPIdG}, (key, group) => new { sumR = group.Sum(k => k.PrValue), pidG = key.PrPIdG }); var pLike = ctx.PlProjectLike .Where(x => x.PlValue == "Like") .Select(c => c) .GroupBy(g => new {g.PlPIdG}, (key, group) => new { sumR = group.Count(), pidG = key.PlPIdG }) .OrderByDescending(g => g.sumR); var pConnect = ctx.PcProjectConnect .Where(x => x.PcStatus == "Connected