Advertisement
hussein87gabriel

Agrupar objetos duplicados de una lista C#

Feb 22nd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. var dup = EntLstServicios
  2.           .GroupBy(x => new { x.ServicioId })
  3.           .Select(group => new { Name = group.Key, Count = group.Count() })
  4.            .OrderByDescending(x => x.Count);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement