title: WebAPI how to specify which route a controller will be reached
body: <p>I have been experimenting with MVC WebAPI, pretty cool stuff. But I am struggling with the concept of routes.</p>
  
  <p>as an example I have a webAPI project structure something like the following:</p>
  
  <p>Project:  </p>
  
  <ul>
  <li>Controllers<br>
  <ul>
  <li>Customers
  <ul>
  <li>CustomerController.cs</li>
  <li>CustomerAddressController.cs</li>
  </ul></li>
  <li>Products
  <ul>
  <li>ProductCategoriesController.cs</li>
  <li>ProductsController</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Currently I have one API route defined In WebApiConfig.cs</p>
  
  <pre><code>        config.Routes.MapHttpRoute(
              name: "CustomerApi",
              routeTemplate: "api/customer/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
  </code></pre>
  
  <p>This worked fine when I only had the customer related controllers.
  so I could call:  </p>
  
  <ul>
  <li>GET api/customer/CustomerAddress/?customerID= 1234</li>
  </ul>
  
  <p>but now that I have added the Product related controllers I find with the configuration as is (of course) to get products I have to call the Uri:  </p>
  
  <ul>
  <li>GET api/customer/products/?prodID= 5678   *BUT I don't want this Uri</li>
  </ul>
  
  <p>instead I want:</p>
  
  <ul>
  <li>GET api/products/?prodID= 5678   </li>
  </ul>
  
  <p>and for product categories I would like something akin to:</p>
  
  <ul>
  <li>GET api/products/categories/?catID= 1357</li>
  </ul>
  
  <p>I thought that what I had to do was add more routes, but I cant find how to associate the various controllers with the route I wish for them?</p>
  
  <p>if I do add another route I end up with two different uri's routing to each of the controllers I have built.</p>
  
  <p>How can I achieve the logical partitioning that I desire?</p>