title: Two Controllers on the same Web API application
body: <p>I am trying to add one more controller to our existing Web API. The controllers are like </p>
  
  <pre><code>public class TDataController : ApiController
  {        
     [HttpGet]
     public HttpResponseMessage Getdetails(string ROOM, DateTime DOB_GT, DateTime DOB_LT, string STATUS_TYPE)
     { 
       // Code for the controller
     }
  }
  </code></pre>
  
  <p>and this is the controller I am trying to add in the same Application</p>
  
  <pre><code>public class TDataSubDateController : ApiController
  {
     [HttpGet]
     public HttpResponseMessage Getdetails(string ROOM, string STATUS_TYPE, DateTime? SUBDATE_GT = null, DateTime? SUBDATE_LT = null)
     {
       //Code for the controller
     }
  }
  </code></pre>
  
  <p>When I am trying to call the second controller like</p>
  
  <p><a href="http://localhost:33823/api/TDataSubDate?ROOM=xxx&amp;STATUS_TYPE=xxx&amp;SUBDATE_GT=xxxx&amp;SUBDATE_LT=xxxx" rel="nofollow noreferrer">http://localhost:33823/api/TDataSubDate?ROOM=xxx&amp;STATUS_TYPE=xxx&amp;SUBDATE_GT=xxxx&amp;SUBDATE_LT=xxxx</a></p>
  
  <p>But it throws the <code>HTTP 404 Page Not Found</code>error. Do I have to create a different route in the WebConfig.cs. The RouteConfig.cs currently looks like</p>
  
  <pre><code>     public static class WebApiConfig
  {
      public static void Register(HttpConfiguration config)
      {
          // Web API configuration and services
  
          // Web API routes
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
      }
  }
  </code></pre>