using System.Collections.Generic;
public static void Main()
List<Employee> employees = new List<Employee>
new Employee { Name = "foo", Type = "A" },
new Employee { Name = "bar", Type = "B" },
var result = employees.Select(x => new Employee { Name = x.Name,Type = x.Type }).GroupBy(x => new { x.Type, x.Name }).ToList();
foreach(var item in result)
Console.WriteLine("Category: {1} {0}", item.Key.Type, item.Key.Name);
public string Name { get; set; }
public string Type { get; set; }