Dynamic Predicates over Web Service?

Posts   
 
    
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 27-Sep-2007 02:30:26   

Hi all,

Does anyone have a suggestion on how to pass a dynamic predciate expression over a web service?

I'm using WCF.

I would like to allow the client to build a filtering predicate expression. I was thinking of passing an array of "FilterDTOs".

FilterDTOs would have a fieldname, predicate, and value.

On the server side, I would construct the filter based on the DTOs.

Is this the best way to go?

Any other suggestions? Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 27-Sep-2007 11:38:14   

If teh client has only the ability to filter on field operator value ... then you could do it that way.

However, if the client has to be able to do field < (expression) etc., you're out of luck, but it will get complicated from there...

Frans Bouma | Lead developer LLBLGen Pro