title: How do you set the default route in MVC6 when using attributes?
body: <p>In MVC5 you could set the default route using the following attribute on a controller? </p>
  
  <p>[Route("{action=index}")]</p>
  
  <p>What is the equivalent of this in MVC6? </p>
  
  <p><strong>Update</strong></p>
  
  <p>This is the code I had in MVC5 </p>
  
  <pre><code>    [Route("{action=index}")]
      public class StaticPagesController : Controller
      {
          public ActionResult About()
          {
             return View();
          }
  
          public ActionResult Contact()
          {
             return View();
          }
  
          public ActionResult Index()
          {
             return View();
          }
      }
  </code></pre>
  
  <p>I have not been able to work out how to do the equivalent in MVC6 but I've been able to get the same functionality working using the following: </p>
  
  <pre><code>    [Route("[action]")]
      public class StaticPagesController : Controller
      {
          public ActionResult About()
          {
             return View();
          }
  
          public ActionResult Contact()
          {
             return View();
          }
  
          [Route("/[action]")]
          [Route("/")]
          public ActionResult Index()
          {
             return View();
          }
      }
  </code></pre>