It’s groups by needed properties and select:
List<Product> result = pr.GroupBy(g => new { g.Title, g.Price })
.Select(g => g.First())
.ToList();
More Related Contents:
- LINQ’s Distinct() on a particular property
- Group by in LINQ
- Group By Multiple Columns
- LINQ with groupby and count
- Distinct by property of class with LINQ [duplicate]
- C# Linq Group By on multiple columns [duplicate]
- LINQ Grouping dynamically
- LINQ Select Distinct with Anonymous Types
- Client side GroupBy is not supported
- LINQ: combining join and group by
- Linq order by, group by and order by each group?
- LINQ Group By Multiple fields -Syntax help
- ILookup vs. IGrouping
- Get a list of distinct values in List
- Group by variable integer range using Linq
- How to use LINQ Distinct() with multiple fields
- LINQ to Entities group-by failure using .date
- Get a list greater than specific value from lists usinq linq c#
- How to perform Join between multiple tables in LINQ lambda
- LINQ: Select an object and change some properties without creating a new object
- For vs. Linq – Performance vs. Future
- LINQ to Entities does not recognize the method ‘Int32 Int32(System.String)’ method, and this method cannot be translated into a store expression
- Nested “from” LINQ query expressed with extension methods
- How can I split an IEnumerable into groups of IEnumerable [duplicate]
- IEqualityComparer for SequenceEqual
- Linq order by boolean
- LINQ Join 2 Lists
- Is there an “Explain Query” for MongoDB Linq?
- Calling a SQL User-defined function in a LINQ query
- how do access previous item in list using linQ?