I feel a bit absurd asking this but I can\'t find a way to get parameters for a get request at /api/foo?sort=name for instance.
/api/foo?sort=name
In the ApiControll
ApiControll
if we have a proper model for that request
for example
public class JustModel { public int Id {get;set;} public int Age {gets;set;} }
and query like this
/api/foo?id=1&Age=10
You could just use [FromUri] attribute
[FromUri]
For example
public IHttpActionResult GetAge([FromUri] JustModel model){}