Hi,
I am using LLBLGEN 3.0 with Oracle and LLBLGen Runtime Framework.
I am trying to load the combobox with following query.
SELECT DISTINCT DESCRIPTION FROM TAXGROUP WHERE FLAG=0 ORDER BY DESCRIPTION ASC";
LLBLGEN Code I have written is
var taxgroupdatasource = new EntityCollection<TaxgroupEntity>(new TaxgroupEntityFactory());
var taxgroupbucket = new RelationPredicateBucket();
using (var adaptercounty = new DataAccessAdapter())
{
adaptercounty.FetchEntityCollection(entityCollectiontaxgroup, null);
taxgroupbucket.PredicateExpression.Add(TaxgroupFields.Flag == 0);
taxgroupbucket.PredicateExpression.AddWithAnd(
new FieldCompareSetPredicate(TaxgroupFields.Description.SetAggregateFunction(AggregateFunction.Max)));
adaptercounty.FetchEntityCollection(taxgroupdatasource, taxgroupbucket, 0,
new SortExpression(TaxgroupFields.Description |
SortOperator.Ascending));
cmbsubscriptionamounttaxgroupid.DataSource = taxgroupdatasource;
cmbsubscriptionamounttaxgroupid.DisplayMember = "DESCRIPTION";
cmbsubscriptionamounttaxgroupid.ValueMember = "TAXGROUPID";
cmbsubscriptionamounttaxgroupid.SelectedIndex = -1;
}
Problem is the line taxgroupbucket.PredicateExpression.AddWithAnd(
new FieldCompareSetPredicate(TaxgroupFields.Description.SetAggregateFunction(AggregateFunction.Max))); is not supported in above function i have written. I dont know what is wrong in the line I have written or there is different of writing the same.
Option2
Is there way to bind typedview to datasource?