title: WCF WebAPI routing
body: <p>This is probably a silly question.. but what the heck, I'm a bit stumped and frustrated. </p>
  
  <p>I'm trying to add a REST service to my application. I want to support two types of GET which have optional parameters. </p>
  
  <p>In the global ascx I have; </p>
  
  <pre><code> routes.Add(new ServiceRoute("api/userstats", new HttpServiceHostFactory() { Configuration = config }, typeof(RESTService.APIs.UserStatsAPI))); 
  </code></pre>
  
  <p>And then in that controller I have; </p>
  
  <pre><code> [WebGet(UriTemplate = "{userguid}")]
      public IQueryable&lt;UserStat&gt; Get(string userguid)
      {
          return null;
      }
  
      [WebGet(UriTemplate = "{userguid}/{genericstatid}")]
      public IQueryable&lt;UserStat&gt; Get(string userguid, int genericstatid)
      {
          return null;
      }
  </code></pre>
  
  <p>So basically you can query all the stats for a user or just the ones of a specific type. When I try to run the app, it complains because I have two definitions for GET. </p>
  
  <blockquote>
    <p>Cannot have two operations in the same contract with the same name, </p>
  </blockquote>
  
  <p>I can understand why, but I'm not sure how to get around it. If it was MVC I'd define different types of routing, but I'm not sure how to do that in a service route. </p>
  
  <p>Thanks for any help. I'm going to go get a coffee and see if that helps. </p>