cyrianox
cyrianox

Reputation: 182

How to get a filtered list

I'm trying to do something like this :

      listeTagGr.DataContext = From a In oo.articles
                              Where a.producttype.id.Equals(1)
                              Select a.tagstrings Distinct

Error : tagstrings is a list. I wan't to retrieve the list of distincts tagstrings for articles where producttype is 1

Upvotes: 0

Views: 37

Answers (1)

Craig Stuntz
Craig Stuntz

Reputation: 126547

  listeTagGr.DataContext = (From a In oo.articles
                            Where a.producttype.id.Equals(1)
                            From ts in a.tagstrings
                            Select ts).Distinct()

Upvotes: 2

Related Questions