title: In Web API, how do you overload Get when one method contains with nullable value types as parameters
body: <p><strong>UPDATE</strong></p>
  
  <p>My original assumption was that optional parameters were the cause of the problem. That appears to be incorrect. Instead, it appears to be a problem with multiple action methods when one of those methods contains nullable value types (e.g. int? ) for some of the parameters.</p>
  
  <p>I'm using Visual Studio 2012 RC and am just getting started with Web API. I've run into an issue and getting the error "No action was found on the controller 'Bars' that matches the request."</p>
  
  <p>I've got a Bars controller. It has a Get() method that takes in optional parameters.  </p>
  
  <pre><code>public IEnumerable&lt;string&gt; Get(string h, string w = "defaultWorld", int? z=null)
  {
      if (z != 0)
          return new string[] { h, w, "this is z: " + z.ToString() };
      else
         return new string[] { h, w };
  }
  </code></pre>
  
  <p>So, I test it out with the following urls</p>
  
  <ul>
  <li>/api/bars?h=hello</li>
  <li>/api/bars?h=hello&amp;w=world</li>
  <li>/api/bars?h=hello&amp;w=world&amp;z=15</li>
  </ul>
  
  <p>And it works for all three.</p>
  
  <p>Then, I go to add another Get() method, this time with a single id parameter</p>
  
  <pre><code> public string Get(int id)
   {
       return "value";
   }
  </code></pre>
  
  <p>I test the urls again. This time /api/bars?h=hello&amp;w=world and api/bars?h=hello fail. The error message is <strong>"No action was found on the controller 'Bar' that matches the request."</strong></p>
  
  <p>For some reason, these two methods don't play nicely together. If I remove <code>Get(int id)</code>, it works. If I change int? z to string z, then it works (, but then it requires converting the objects inside my action method!). </p>
  
  <p>Why is Web API doing this? Is this a bug or by design?</p>
  
  <p>Many thanks.</p>