Try this
var DistinctItems = employees.GroupBy(x => x.EmpID).Select(y => y.First());
foreach(var item in DistinctItems)
{
//Add to other List
}
Comments
Post a Comment