PrefetchPath & SubPath

Posts   
 
    
jmcjq2
User
Posts: 26
Joined: 17-Nov-2009
# Posted on: 28-Sep-2010 08:11:40   

I have the following prefetchpaths:


IPrefetchPath2 prefetchpath = new PrefetchPath2(EntityType.BreakfastProgramParticipantEntity);
prefetchpath.Add(BreakfastProgramParticipantEntity.PrefetchPathBreakfastProgram).SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode);       prefetchpath.Add(BreakfastProgramParticipantEntity.PrefetchPathBreakfastProgram).SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode_);


If I don't include the second path it works but not when it's included, what is the correct way of adding the second subpath?

Cheers John

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 28-Sep-2010 08:41:51   
IPrefetchPath2 prefetchpath = new PrefetchPath2(EntityType.BreakfastProgramParticipantEntity);

var prefetchPathElement = prefetchpath.Add(BreakfastProgramParticipantEntity.PrefetchPathBreakfastProgram);

prefetchPathElement.SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode);
prefetchPathElement.SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode_);
jmcjq2
User
Posts: 26
Joined: 17-Nov-2009
# Posted on: 28-Sep-2010 08:49:23   

Walaa wrote:

IPrefetchPath2 prefetchpath = new PrefetchPath2(EntityType.BreakfastProgramParticipantEntity);

var prefetchPathElement = prefetchpath.Add(BreakfastProgramParticipantEntity.PrefetchPathBreakfastProgram);

prefetchPathElement.SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode);
prefetchPathElement.SubPath.Add(BreakfastProgramEntity.PrefetchPathLookupCode_);

Great! Thanks very much