Linq Distinct() by name for populate a dropdown list with name and value
The following expression will select only distinct companies and return the first occurence with its id. partnerService.SelectPartners().GroupBy(p => p.Name).Select(g => g.First());