score:3
Accepted answer
post.posts
.where(p => p.ispublished) // ienumerable<post>
.select(c => c.categories) // ienumerable<ienumerable<string>>
.distinct() // does nothing, since all inner ienumerable<string>
// objects are different
Source: stackoverflow.com
Related Query
- Linq group by distinct and iterate over it
- How can I iterate over a collection and change values with LINQ extension methods?
- How to use LINQ Group Records and use Distinct
- Iterate with LINQ over a list and set founded varible
- Iterate and select over two dimensional string array with LINQ
- Group by one column and Distinct by another column using Linq
- Need help on Linq with group by and distinct
- Linq - Group by and count over multiple fields (output on single total)
- LINQ - How to group and count distinct values?
- How to select Distinct / Group By child property in both LINQ method and syntax?
- How to use Linq Group By and Distinct for Treeview
- Linq - Group by and apply a distinct to a single field
- Iterate through LINQ to SQL query containing COUNT and GROUP BY
- Linq Join Two List , Group By Result And Select Distinct Value
- Linq query to iterate group and filter only selected type
- using Linq to iterate over an array and create a new List of objects?
- Iterate over array with LINQ and use the value at each position
- Convert Sql query containing Group By, Distinct and Aggregate function to Linq to Entity
- LINQ Group and Distinct
- LINQ - Left Join, Group By, and Count
- LINQ Group By and select collection
- Linq order by, group by and order by each group?
- Linq Query Group By and Selecting First Items
- LINQ to SQL using GROUP BY and COUNT(DISTINCT)
- LINQ aggregate and group by periods of time
- Iterate through properties and values of an object returned via a linq query on a domain model
- linq distinct or group by multiple properties
- LINQ query with Distinct and Union
- LINQ Get Distinct values and fill LIST
- Using LINQ to group by multiple properties and sum
More Query from same tag
- Joining two tables displays NULL
- Dynamic OrderBy // InvalidOperationException: No generic method 'ThenByDescending' on type 'System.Linq.Queryable' is compatible
- Several assignment into one Select
- Find duplicate xelements
- Need help with LinqToXml grouping
- linq get recursive list only one level in c#
- How to parse XML with namespace
- how to assign collection of classes to a new viewmodel
- Remove duplicates in the list using linq
- LINQ to SQL classes to my own classes
- Determine the position of an element in an IQueryable
- How can I write a generic method that sets up a Moq object expectation?
- Need to build a generic query method using LINQ expressions
- Get a specific column value from a table when query through linq
- Is LINQ's Any method efficient?
- Edit Row in LINQ
- Filter out distinct elements with condition
- Compare array with TextBox to check for repeated values in database
- Need a performant way to return all duplicates from a list
- Sort datatable on occurrence of string
- Nested Linq to get Manager detail based on Employee Id
- Entity framework execution time
- I need to query table for values in two duplicate columns
- LINQ to entites max select max item by date EF Core 3
- How can I improve speed of DataTable group by Day method
- Custom sorting using LINQ and Function
- Using Linq to do a Contains with multiple values
- (obj != null) doesn't work
- subquery with top 1 and more than equal to using Linq
- Dynamically select columns in LINQ statement