I really want to use Web API but right now it's broken as in can't ever be used in production broken.
That is that it doesn't support $select so you're always select * and you're always returning full objects. (Amature hour at the zoo!)
So $select is just a parameter on the querystring.
And if I could either bind that to a parameter on the method (can't because of the $ right?) or exclude that parameter and have it still match and just get it from the Request.QueryString then I can use linq dynamic to fix this oversite and just return dynamic.
Then when someone at MS comes to their senses and realizes that this is a bad idea and enables $select it's just a matter of removing the extra method and all of the regular ones will work just fine. (or whatever syntax that they require)
John Galt
Member
30 Points
47 Posts
Hacking $select into Web API
Mar 26, 2012 08:21 PM|LINK
I really want to use Web API but right now it's broken as in can't ever be used in production broken.
That is that it doesn't support $select so you're always select * and you're always returning full objects. (Amature hour at the zoo!)
So $select is just a parameter on the querystring.
And if I could either bind that to a parameter on the method (can't because of the $ right?) or exclude that parameter and have it still match and just get it from the Request.QueryString then I can use linq dynamic to fix this oversite and just return dynamic.
Then when someone at MS comes to their senses and realizes that this is a bad idea and enables $select it's just a matter of removing the extra method and all of the regular ones will work just fine. (or whatever syntax that they require)
Thoughts on how to do this?