简体   繁体   中英

Lambda expression as query for API?

Just started looking at the OData support for the WebAPI and for now it seems like there is alot left to do until the "querying-support" becomes truly interesting.. and thats sort of where this idea were born.. would it be possible some how to send a lambda expression as a querystring and then parse that and run it against an IEnumerable and then return the value?

The whole problem is the expression parsing and how to actually execute the parsed expression against the object.. Im quite unsure about how to do such a thing.. any ideas?.. or is there any place where I can read more about this?

Thanks in advance!

What I understood from your interest is to write your own LINQ parser. check this out: Invent your own dynamic LINQ parser

Also have a look at the discussion happening over implementation of Like operator support for OData here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM