score:2

Accepted answer

I would suggest you look at InterLINQ. It provides the ability to serialize an expression and transmit over WCF.

I'm using it with NHibernate to achieve a similar outcome to what you're describing and it seems to work well. (There's a bit to get your head around though, so as others have suggested, WCF Data Services / OData would be be quicker/easier).

score:2

Really, you have two options.

  1. Don't pass general queries over the wire. The server should have a GetProductsWithProductIdGreaterThan method that the client invokes.

  2. Look at WCF Data Services.

The third option, the one your requesting, is just hard.= Even if you're extremely fluent in LINQ, WCF, and Expression, it's still extremely difficult.


Related Articles