title: Two GET in MVC C#
body: <pre><code>public class EmployeesController : ApiController
      {
      public IEnumerable&lt;Employee&gt; GetAllEmployees()
      {
          return (new EmployeeData()).GetEmployeeRecords();
      }
  
      public Employee GetSingleEmployee(int id)
      {
          return (new EmployeeData()).GetSingleEmployeeRecord(id);
      }
      public void Delete(int id)
      {
          (new EmployeeData()).DeleteEmployeeRecord(id);
      }
  } 
  </code></pre>
  
  <p>This is what I have now. I'm trying to make the app call the first function with a get call api/employee and the second one with a get call api/employee/(an ID number) eg api/employee/75. The get call always goes to the first one. How do I solve this?</p>
  
  <p>This is my routing:</p>
  
  <pre><code> namespace EmployeeApp
   {
      public class RouteConfig
      {
            public static void RegisterRoutes(RouteCollection routes)
            {
                      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
                      routes.MapRoute(
                          name: "Default",
                          url: "{controller}/{action}/{id}",
                          defaults: new { action = "Index", id=UrlParameter.Optional }
                      );
             }
       }
   }
  </code></pre>