How to filter typed view with PredicateExpression?

Posts   
 
    
magic
User
Posts: 125
Joined: 24-Nov-2008
# Posted on: 02-Jan-2010 17:21:46   

I have this piece of code that filters an EntityCollection by a given PredicateExpression:

EntityCollection<StatCrewGameActionMVEntity> all = ...snip...

// create filter
IPredicateExpression filter = new PredicateExpression();
...snip...

// get the elements that match the constructed filter
List<int> matches = all.FindMatches(filter);

How can I do the same for a Typed View? For now I am only able to use confused

MyTypedViewRow[] filtered = myTypedView.Select(string filterExpression);
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Jan-2010 20:34:52   

As the typedView is a DataTable you only have the methods that dataTable offers to find in memory (Select for instance).

David Elizondo | LLBLGen Support Team
magic
User
Posts: 125
Joined: 24-Nov-2008
# Posted on: 03-Jan-2010 22:08:18   

daelmo wrote:

As the typedView is a DataTable you only have the methods that dataTable offers to find in memory (Select for instance).

thanks.

Assuming I have to use select, can you point me to some help how I can use/convert predicate expressions to create the filter expression for the select?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Jan-2010 03:20:38   
David Elizondo | LLBLGen Support Team