Convert entitycollections to generic dictionary types?

Posts   
 
    
mlk19569
User
Posts: 1
Joined: 25-Sep-2009
# Posted on: 25-Sep-2009 16:29:17   

I'm relatively new to LLBL Gen, so forgive the newbie questions....

I need to convert entitycollections to generic .NET Dictionary<> types. I'm looking at using EntityPropertyProjectors, but the documentation isn't very clear on how to exactly implement it.

Is that the right way to go or should I be looking in a different direction?

Thanks,

Meredith

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Sep-2009 17:54:14   

Hi Meredith,

You want to create a list of property projector in one shot. You could do sometihng like this (assuming you are using Adapter. If not, just use EntityFields instead of EntityFields2):

List<IEntityPropertyProjector> entityPropertyProjectors =
     EntityFields2.ConvertToProjectors(new CustomerEntityFactory().CreateFields());
David Elizondo | LLBLGen Support Team