var distinctItems = items.GroupBy(x => x.Id).Select(y => y.First());
More Related Contents:
- property remove from the list
- Dynamic LINQ OrderBy on IEnumerable / IQueryable
- Sorting a list using Lambda/Linq to objects
- How can I get LINQ to return the object which has the max value for a given property? [duplicate]
- LINQ to SQL and a running total on ordered results
- Linq select objects in list where exists IN (A,B,C)
- Find() vs. Where().FirstOrDefault()
- Linq to Objects – return pairs of numbers from list of numbers
- C# Linq where clause as a variable
- LINQ identity function
- Code equivalent to the ‘let’ keyword in chained LINQ extension method calls
- linq to entities vs linq to objects – are they the same?
- Linq OrderBy against specific values
- Get All instead of FirstOrDefault
- How to write this nested foreach loop query in LINQ?
- Group by in LINQ
- Update all objects in a collection using LINQ
- C# Linq Group By on multiple columns [duplicate]
- How would you do a “not in” query with LINQ?
- Alphanumeric sorting using LINQ
- XElement namespaces (How to?)
- Row_number over (Partition by xxx) in Linq?
- Convert anonymous type to class
- Comparing 2 objects and retrieve a list of fields with different values
- Find if listA contains any elements not in listB
- Find all child controls of specific type using Enumerable.OfType() or LINQ
- Remove item from list based on condition
- How to convert DataTable to class Object?
- Accessing System Databases/Tables using LINQ to SQL?
- C# Linq to SQL: How to express “CONVERT([…] AS INT)”?