Adapter Mode - getting child collections

Posts   
 
    
daz_oldham avatar
daz_oldham
User
Posts: 62
Joined: 20-Jul-2007
# Posted on: 02-Apr-2009 16:23:19   

Hello

I'm not new to LLBL but I am new to using it in Adapter mode.

I've done some code to select a recordset:

DataAccessAdapter adapter = new DataAccessAdapter();
SiteEntity site = new SiteEntity(config.General.LimitToSite);
EntityCollection<SitePluEntity> plus = site.SitePlu;
adapter.FetchEntityCollection(plus,null);

And I would like to use a child collection of my plus collection called "style" - obviously in SelfServicing I'd just do:

site.style[3].something... 

.... for example, but I can't do that (and I want to nest down about 4 levels in total.

Thanks guys... this is using v2.5 by the way.

Darren

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 02-Apr-2009 20:55:43   

What you need are Prefetch Paths

These allow you to specify the graph of entities that you want to retrieve in one go.

Matt