Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# linq select only unique values from list

var uniqueCategories =  repository.GetAllProducts()
                                  .Select(p=>p.Category)
                                  .Distinct();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linq #select #unique #values #list
ADD COMMENT
Topic
Name
4+1 =