Question : how to use distinct in linq query in c#
Answered by : raksha-deshmukh
var distValues = objList.Select(o=>o.typeId).Distinct().ToList();
Source : | Last Update : Thu, 11 Feb 21
Question : linq distinct
Answered by : phipi
var uniquePeople = from p in people group p by new {p.ID} //or group by new {p.ID, p.Name, p.Whatever} into mygroup select mygroup.FirstOrDefault();
Source : https://stackoverflow.com/questions/489258/linqs-distinct-on-a-particular-property | Last Update : Mon, 18 Jan 21