Fetched EntityCollection GroupBy (intellisense suggests its possible.. but don't understand)

Posts   
 
    
BexMed
User
Posts: 63
Joined: 18-Jul-2007
# Posted on: 11-Jul-2008 16:29:49   

Hello

I have an entity collection that has already been fetched and I am wondering if it is possible to group it at this stage.

I have used intelisense and after myEntityCollection "." I get "GroupBy" as one of the options..

Thing is I don't understand what its asking for as parameters, and if indeed it will enable me to group my entity collection.

Its says Func<EntityBase2,TKey>keySelector.. in the intellisense

Is it possibly to do what I want, or is this "GroupBy" something completely different.

If so could you give me an example?

Thanks

Bex

PS I am using adapter V2.6 (6th June 2008 )

arschr
User
Posts: 893
Joined: 14-Dec-2003
# Posted on: 11-Jul-2008 18:23:29   

Is it possibly to do what I want, or is this "GroupBy" something completely different.

Yes, it is possible using linq to objects. The GroupBy is an extension method provided by linq on the collection.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-Jul-2008 20:46:03   

As Al mentioned, this is supported by Linq in-memory grouping. Take a look at this (in that page find "GroupBy").

David Elizondo | LLBLGen Support Team