Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

groupby in linq

var results = from p in persons
              group p.car by p.PersonId into g
              select new { PersonId = g.Key, Cars = g.ToList() };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #groupby #linq
ADD COMMENT
Topic
Name
9+1 =