title: Using WebAPI Route attribute
body: <p>I've got a few methods, which I want to follow a specific pattern for their URLs.</p>
  
  <p>Basically there's restaurants, which have IDs, and a collection of Terminals under them.</p>
  
  <p>I'm trying to get the following sort of pattern to emerge:
  api/Restaurant - get all Restaurants
  api/Restaurant/Bobs - gets the restaurant with the ID of Bobs
  api/Restaurant/Bobs/terminals - get all terminals in bobs restaurant
  api/Restaurant/bobs/terminals/second - get the terminal with the ID of second in the restaurant bob</p>
  
  <p>I've got the methods to do this, and I've assigned the Route attribute to each as follows:</p>
  
  <pre><code>    [HttpGet]
      public IEnumerable&lt;IRestaurant&gt; Get()
      {
          //do stuff, return all
      }
  
      [HttpGet]
          [Route("api/Restaurant/{restuarantName}")]
          public IRestaurant Get(string restaurantName)
          {
             //do stuff
          }
  
      [HttpGet]
      [Route("api/restuarant/{restaurantName}/terminals")]
      public IEnumerable&lt;IMiseTerminalDevice&gt; GetDevices(string restaurantName)
      {
         //do stuff
      } 
  
      [HttpGet]
      [Route("api/restaurant/{restaurantName}/terminals/{terminalName}")]
      public IMiseTerminalDevice GetDeviceByName(string restaurantName, string terminalName)
      {
          //do stuff
      }
  </code></pre>
  
  <p>However only my basic GET (api/Restaurant) is working.  My WebAPI config is the default, and reads</p>
  
  <pre><code>    config.MapHttpAttributeRoutes();
  
      config.Routes.MapHttpRoute(
          name: "DefaultApi",
          routeTemplate: "api/{controller}/{id}",
          defaults: new { id = RouteParameter.Optional }
      );
  
      config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
  </code></pre>
  
  <p>Anybody know where I'm going wrong?  All other methods return routing mismatch (restaurant with ID) or a 404.</p>
  
  <p>Thanks in advance!</p>