public static List <CoinBalanceDisplay> ToBalance(this PlayerAwards item, Coins coins) { //TODO not expired etc return(item.Where(e => coins.Any(c => c.EntityRefId.Equals(e.CoinRefId))).GroupBy(f => f.CoinRefId).Select(cl => new CoinBalanceDisplay { Coin = coins.FirstOrDefault(g => g.EntityRefId.Equals(cl.First().CoinRefId))?.ToDisplay(), Balance = cl.Sum(s => s.Value), } ).ToList()); }