Returning a Collection without filtering

Posts   
 
    
Gareth
User
Posts: 24
Joined: 09-Apr-2004
# Posted on: 11-Apr-2004 23:48:55   

Hi,

Maybe I've missed the obvious but can you return a collection with passing a filter.

This is my work around.

GroupCollection groups = new GroupCollection();

IPredicateExpression groupsFilter = new PredicateExpression(); groupsFilter.Add(PredicateFactory.CompareValue(GroupFieldIndex.GroupID, ComparisonOperator.GreaterThan,0));

Cheers

Gareth

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 11-Apr-2004 23:53:03   

Are you referring to:

groups.GetMulti(groupsFilter); ?

or are you referring to: myCustomer.Orders

and you want to filter on specific orders for this customer? If so, use the SetCollectionParameters<relatedEntity>() method

Frans Bouma | Lead developer LLBLGen Pro
Gareth
User
Posts: 24
Joined: 09-Apr-2004
# Posted on: 11-Apr-2004 23:56:55   

Sorry, yes the next line is

groups.GetMulti(groupsFilter);

What I want to do is fill dropdownlists (with all groups) without having to filter the collection like the example above. Does this make more sense?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 12-Apr-2004 00:54:25   

groups.GetMulti(null) will do the trick simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Gareth
User
Posts: 24
Joined: 09-Apr-2004
# Posted on: 12-Apr-2004 01:04:28   

Top man, thanks.