title: asp.net mvc web api same controller different function parameters
body: <p>In my controller UserApiController, I have the following functions:</p>
  
  <pre><code>public object GetUsers(string CountryID, string StateID)
  {
     //biz
  }
  
  public object GetPositions(int CompanyID, int DepartmentID)
  {
     //biz
  }
  </code></pre>
  
  <p>In my controller SalesApiController, I have the following functions:</p>
  
  <pre><code>public object GetOrders(string CountryID, int CompanyID)
  {
     //biz
  }
  
  public object GetProducts(string CountrID, string StateID, int CompanyID)
  {
     //biz
  }
  </code></pre>
  
  <p>in the web api config, I can map like this:</p>
  
  <pre><code>config.Routes.MapHttpRoute(
      name: "DefaultApi",
      routeTemplate: "api/{controller}/{action}/{CountryID}/{StateID}",
      defaults: new {  }
  </code></pre>
  
  <p>and it works for UserApiController.GetUsers as the function signature only matches with GetUsers.</p>
  
  <p>now, questions:</p>
  
  <p>1.how to define a route to handle different functions with same amount of parameters (either within same or different controller)</p>
  
  <p>2.how to define a route to handle different functions with different amount of parameters (either within same or different controller, if possible)</p>