title: ASP.NET Web API - GET request with multiple arguments
body: <p>What I'm trying to do is to have an api request like /api/calculator?<strong>1</strong>=7.00&amp;<strong>2</strong>=9.99&amp;<strong>3</strong>=5.50&amp;<strong>4</strong>=45.76 etc. How my controller can grab the request data? The keys/codes of the query string are ints between 1 and 1000. In the query string they can be <strong>some</strong> of the 1000 codes, not necessarily all of them. The value part is doubles.</p>
  
  <p>The one way I think would work is if I create a model object (ex <code>StupidObject</code>) with 1000 properties (should use properties named like p1, p2,..p1000 for codes now, as ints are not an allowed property name), decorated with <code>ModelBinder</code>. Then for the controller I could have something like <code>GetCalcResult(StupidObject obj){...}</code> But that doesn't seem like an elegant solution :)</p>
  
  <p>I tried controllers like <code>GetCalcResult([FromURI]Dictionary&lt;int, double&gt; dict){...}</code> but dict is always null. Also without the <code>[FromURI]</code> I get an error. Also tried <code>List&lt;KeyValuePair&lt;int, double&gt;&gt;</code> as controller parameter with the same results.</p>
  
  <p>Could anyone point me at the right direction or give me an working example?</p>