How To Use Distinct For Particular Column In Linq List

[Solved] How To Use Distinct For Particular Column In Linq List | Perl - Code Explorer | yomemimo.com
Question : how to use distinct for particular column in linq list

Answered by : grieving-guanaco-xrk07g5axhem

CountryData.GroupBy(a=>a.COUNTRY_NAME).Select(a=>a.First());

Source : https://stackoverflow.com/questions/14321013/distinct-in-linq-based-on-only-one-field-of-the-table | Last Update : Mon, 02 May 22

Question : how to use distinct for particular column in linq list

Answered by : grieving-guanaco-xrk07g5axhem

CountryData.Select(x=>x.COUNTRY_NAME).Distinct()

Source : https://stackoverflow.com/questions/14321013/distinct-in-linq-based-on-only-one-field-of-the-table | Last Update : Mon, 02 May 22

Answers related to how to use distinct for particular column in linq list

Code Explorer Popular Question For Perl