Predicate Expression

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 02-Jun-2010 16:56:09   

LLBLGEN Version 2.6 DB Version Oracle 9i Frame work 2.0

In the code below, I have given AccountnatureFields.Flag == 0. But the out put is not filtered and is displaying all records in database. What am I doing wrong here ?

var accountnaturedatasource = new EntityCollection<AccountnatureEntity>(new AccountnatureEntityFactory()); var bucketaccountnature = new RelationPredicateBucket();

        using (var adapter = new DataAccessAdapter())
        {
            adapter.FetchEntityCollection(entitycollectionaccountnature, null);

            bucketaccountnature.PredicateExpression.Add(AccountnatureFields.Flag == 0); // Filter by recordvalidflag

            adapter.FetchEntityCollection(accountnaturedatasource, bucketaccountnature, 0,
                                          new SortExpression(AccountnatureFields.Description | SortOperator.Ascending));
            dgridaccountnature.DataSource = bindingsourceaccountnature;

        }
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Jun-2010 03:39:50   

What is bindingsourceaccountnature? After all you are fetching accountnaturedatasource.

David Elizondo | LLBLGen Support Team