title: ASP.Net Core 2.2 Upgrade - Default Route Redirection Issue
body: <p>Until Asp.Net Core 2.1, I was using below code in order to redirect default route to swagger endpoint.</p>
  
  <pre><code>app.UseMvc(builder =&gt;
  {
      builder.MapRoute("default", template: "api/{controller}/{action}/{id?}");
      builder.MapGet("", context =&gt;
      {
          context.Response.Redirect("./swagger/index.html", permanent: false);
          return Task.FromResult(0);
      });
  
  });
  </code></pre>
  
  <p>However, when I upgraded to Asp.Net Core 2.2 this code did not work as expected (redirection is called)</p>
  
  <p>Is this known issue? How can I solve it?</p>
  
  <p><strong>Edit: Thanks to @KirkLarkin</strong></p>
  
  <p>I have changed <code>options.EnableEndpointRouting</code> to <code>false</code> and now it is working. However as I unsderstand this is legacy routing method. </p>
  
  <p>What do I need to do in order to make routing with <code>options.EnableEndpointRouting = true;</code>?</p>