Suppose my query is :
SELECT DISTINCT Description
FROM Table1
WHERE (FKId = 1)
My code of c# is
DataTable listDescription = new DataTable ();
IEntityFields2 fields;
fields = new EntityFields2(2);
fields.DefineField(Table1Fields.Id, 0);
fields.DefineField(Table1Fields.Description, 1);
IRelationPredicateBucket predicate = new RelationPredicateBucket();
predicate.PredicateExpression.Add(Table1Fields.FKId == 1);
predicate.Relations.Add(Table1Entity.Relations.TableFKEntityUsingPackageRespondentId, JoinHint.Left);
m_adapter.FetchTypedList(fields, listRFQ, predicate,false);
return listRFQ;
Now the things is how to apply distinct on description ??