title: How to allow multiple Hyphen in action method name in mvc core 3.1?
body: <p>I am working on an application in which requirements are to show url in following format for seo.</p>
  <pre><code>Initial format = www.abc.com/Home/OnlineShoppingInUk
  
  Required format = www.abc.com/online-shopping-in-uk
  </code></pre>
  <p>I have done following changes in start.cs to hide controller name from url and controller name is removed from url</p>
  <pre><code>     endpoints.MapControllerRoute(
                      name: &quot;onlineShoppingInUk&quot;,
                      pattern: &quot;onlineShoppingInUk&quot;,
                      defaults: new { controller = &quot;Home&quot;, action = &quot;onlineShoppingInUk&quot; });
  
  and in home controller
  
       [Route(&quot;onlineShoppingInUk&quot;)]
       public IActionResult OnlineShoppingInUk()
      {
      ....
      }
  </code></pre>
  <p>But above method not works when url contains hyphen. I have tried following but online-shopping action method never calls and instead index method is called.</p>
  <pre><code>endpoints.MapControllerRoute(
                      name: &quot;online-shopping-in-uk&quot;,
                      pattern: &quot;online-shopping-in-uk&quot;,
                      defaults: new { controller = &quot;Home&quot;, action = &quot;online-shopping-in-uk&quot; });
  </code></pre>
  <p>and in home controller</p>
  <pre><code>     [Route(&quot;online-shopping-in-uk&quot;)]
       public IActionResult OnlineShoppingInUk()
      {
      ....
      }
  </code></pre>
  <p>How to call an action method containing hyphens in Home controller ?</p>