Hi THere
LLBLGenPro v 2.6 , Broswer IE 8, SQL SErver 2005 Express, Telerik RadGrid.
Added the code below to add prefetch to retrieve related entities..
I want to bind a formview to the "master" record ( Contribution record ) - easy enough - and bind a grid to the related
etails" records ( ContributionAllocation ) . What is the simplest way to do this?
protected void ContributionDS_PerformSelect(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs2 e)
{
PrefetchPath2 prefetch = new PrefetchPath2((int)EntityType.PmtContributionEntity);
prefetch.Add(PmtContributionEntity.PrefetchPathPmtContributionAllocation);
ContributionDS.PrefetchPathToUse = prefetch;
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(e.ContainedCollection, e.Filter, 0, e.Sorter, prefetch);
}
}