title: How can I get the current route name with ASP.NET Core?
body: <p>I have an application that is written on the top of ASP.NET Core 2.2 framework.</p>
  
  <p>I have the following controller</p>
  
  <pre><code>public class TestController : Controller
  {
      [Route("some-parameter-3/{name}/{id:int}/{page:int?}", Name = "SomeRoute3Name")]
      [Route("some-parameter-2/{name}/{id:int}/{page:int?}", Name = "SomeRoute2Name")]
      [Route("some-parameter-1/{name}/{id:int}/{page:int?}", Name = "SomeRoute1Name")]
      public ActionResult Act(ActVM viewModel)
      {
          // switch the logic based on the route name
  
          return View(viewModel);
      }
  }
  </code></pre>
  
  <p>How can I get the route name in the action and/or the view?</p>