LinqToQuerystring icon indicating copy to clipboard operation
LinqToQuerystring copied to clipboard

Can I use it to parse linq expressions to odata syntax query string?

Open ghost opened this issue 9 years ago • 2 comments

So for example

Func<Hotel, bool> priceMaxFunc = x => x.Price <= 50;
Func<Hotel, bool> priceMinFunc = x => x.Price >= 20;

then join Funcs into expression

Expression<Func<Hotel, bool>> expression = x => priceMaxFunc(x) && priceMinFunc(x);

and translate to Price lt 50 and Price gt 20

ghost avatar Feb 03 '16 13:02 ghost

@grubyrychu

I emailed Pete directly and he said it is not possible. I would love this feature though.

pvanroos avatar Aug 09 '16 18:08 pvanroos

I found a library that does this. Linq2Rest

pvanroos avatar Aug 09 '16 19:08 pvanroos