score:9
Accepted answer
use groupby
.
objectlist.groupby(o => o.property1);
http://www.codeproject.com/articles/35667/how-to-use-linq-groupby.aspx
Source: stackoverflow.com
Related Query
- How can I count number of objects in a list with a unique property with linq/lambda?
- How can I add have a property of a list populated with a unique number when I populate the list?
- How can I obtain objects from list with C# LINQ using boolean conditions?
- return a list of objects ordered by number of items in navigation property with linq to entity
- How to Count Duplicates in List with LINQ
- How to count the number of elements that match a condition with LINQ
- Getting unique values from a list of objects with a List<string> as a property
- Can I use LINQ to check if objects in a list have a unique ID?
- Count number of given object in a list with LINQ
- How can I pick random objects out of a list with C#?
- How do I use LINQ to count number of objects in largest group?
- How can I split a list vertically in n parts with LINQ
- How can I use linq to return integers in one array that do not match up with an integer property of another array?
- How to convert list of objects with two fields to array with one of them using LINQ
- How do you sort a String List by the number of words matched with an Array in Linq
- How to filter a list with linq depends on counting a property at the same list and take a random group at least minimum total
- How can I speed up this linq query on a List<> with search criteria on 3 attributes in the list object
- How to select all the values of an object's property on a list of typed objects in .Net with C#
- How can I select using LINQ for an entry that contains a LIST with more than one row?
- How to get number of objects with common properties from context using LINQ
- Using linq group by to get from a list of objects with a DateTime property to a list with an interval StartDate, EndDate
- How to get Sum from List in another List as a property with linq
- How can you use LINQ to cast from a collection of base class objects to a filtered list of their respective subclasses?
- How can I add a unique row number to my Linq select?
- How can I split a list with embedded transition markers using LINQ or Reactive Extensions?
- C# how to group List by objects with the same property values
- Get the objects with the maximum value for a specific property from a list using LINQ
- How can I return a list or enumerable of rows where column value has changed with Linq
- How can I get distinct objects extracted from a property of a list of objects?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
More Query from same tag
- Differences between NHibernate, Castle, Linq - Who are they aimed at?
- Cannot implicitly convert type System.Collections.Generic.IEnumerable to System.Collections.Generic.List
- How to do multiple left outer joins in a Linq Query?
- What is the linq equivalent to the SQL IN operator
- Why is My One to Many Query So Slow with Linq to Entities?
- Unable to Select in LINQ to XML, error: Object reference not set to an instance of an object
- Linq query for ordering by ascending order except for one row
- Linq first value from grouping - Why is this not working?
- How do I modify this linq query using the lambda operator?
- How to set order by descending in Linq query based on aggregated column?
- LINQ ordering by highest value per unique value in a certain column
- Create List of Tuples from List using LINQ
- How to set default empty in query
- Convert object to string using Linq
- Check if list of string contains object property value, and if it does remove it from the list of strings
- Is there a way in Linq to apply different calculations based on different conditions
- With LINQ how do you return a string const in the result from the select operator
- Entity Framework: join method
- How to update column data using sql query in linq?
- Sorting XML using LINQ
- How to apply order by to linq query?
- Is it possible that filter IIS worker processes with more criteria?
- Linq DataContext best practice
- LINQ: Search/Filter data from multiple table
- Send a new list to the result of the LINQ query from the list for C#
- Why Fetch should be the last clause in Linq Nhibernate query
- Get full rows based on single column distinct
- Handling Next Record nullable reference Controller Code to pass to viewbag
- Select distinct ID on one table with Linq to EF5
- NHibernate.LINQ Supported Operators