var groupedCustomerList = userList
.GroupBy(u => u.GroupID)
.Select(grp => grp.ToList())
.ToList();
More Related Contents:
- How to read lines to dictionary with linQ [closed]
- Difference Between Select and SelectMany
- Using LINQ to remove elements from a List
- Distinct by property of class with LINQ [duplicate]
- Quickest way to compare two generic lists for differences
- Convert string[] to int[] in one line of code using LINQ
- LINQ – Left Join, Group By, and Count
- When should I dispose of a data context
- How do I use LINQ Contains(string[]) instead of Contains(string)
- Sequence contains no elements?
- Func with out parameter
- Determine if a sequence contains all elements of another sequence using Linq [duplicate]
- LINQ Ring: Any() vs Contains() for Huge Collections
- Writing Recursive CTE using Entity Framework Fluent syntax or Inline syntax
- Linq to EntityFramework DateTime
- LINQ to SQL multiple tables left outer join
- how to check if object already exists in a list
- How to Bulk Update records in Entity Framework?
- LINQ Inner-Join vs Left-Join
- Cast LINQ result to ObservableCollection
- Find character with most occurrences in string?
- Get table-data from table-name in LINQ DataContext
- Is it Linq or Lambda?
- Local variable and expression trees
- convert this LINQ expression into Lambda
- List complex sorting
- Good way to get the key of the highest value of a Dictionary in C#
- How to sort a dictionary by key
- LINQ performance Count vs Where and Count
- Issues Doing a String Comparison in LINQ