Hi Anyone,
I am just a newbie using LLBLGEN pro and I am having trouble using the "ExcludeIncludeFieldsList" to work on my code. I was trying to include a few selected fields to avoid fetching the entire columns in my table to my GridView and to speed up the entire query but so far I couldn't make it work. Can you help me out what is wrong with it?
I am currently using LLBLGenPro 2.6 Final and running under .NET 3.5.
Thanks.
public partial class DropRoutesQld : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ExcludeIncludeFieldsList includedFields = new ExcludeIncludeFieldsList();
includedFields.Add(QldAddressDetailFields.MdsFullStreetName);
includedFields.ExcludeContainedFields = false;
PrefetchPath2 myPath = new PrefetchPath2((int)EntityType.CcdSdLinkEntity);
myPath.Add(CcdSdLinkEntity.PrefetchPathQldAddressDetail,includedFields);
_dsAdress.PrefetchPathToUse = myPath;
IRelationPredicateBucket myInitFilter = new RelationPredicateBucket();
myInitFilter.PredicateExpression.Add(new FieldCompareSetPredicate(QldAddressDetailFields.CdCode, null, CcdSdLinkFields.CdCode, null, SetOperator.In, ((CcdSdLinkFields.DmNum == "4206") & (CcdSdLinkFields.AddressDetailTable == "QLD_ADDRESS_DETAIL"))));
_dsAdress.FilterToUse = myInitFilter;
}
}
}
<div>
<llblgenpro:LLBLGenProDataSource2 ID="_dsAdress" runat="server" EnablePaging="true"
AdapterTypeName="MyDRAGen.DatabaseSpecific.DataAccessAdapter, MyDRAGenDBSpecific"
DataContainerType="EntityCollection"
EntityFactoryTypeName="MyDRAGen.FactoryClasses.QldAddressDetailEntityFactory, MyDRAGen">
</llblgenpro:LLBLGenProDataSource2>
<dxwgv:ASPxGridView ID="_gridviewAddress" runat="server" DataSourceID="_dsAdress" AutoGenerateColumns="true">
</dxwgv:ASPxGridView>
</div>