title: How to have a custom route without parameter names in ASP.NET MVC?
body: <p>I have the following route to my method:</p>
  
  <pre><code>[HttpGet]
  [Route("Company/Employees/{name}")]
  public ActionResult Details(string name)
  </code></pre>
  
  <p>I want to access the employee with a name property of "John" by making a request to</p>
  
  <pre><code>Company/Employees/John
  </code></pre>
  
  <p>But now the route only works if I type:</p>
  
  <pre><code>Company/Employees?name=John
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>This is my route config (inside an area)</p>
  
  <pre><code>context.MapRoute(
              "Company_default",
              "Company/{controller}/{action}/{id}",
              new { controller = "Employees", action = "Index", id = UrlParameter.Optional },
              namespaces: new[] { "MySite.Areas.Company.Controllers" }
          );
  </code></pre>