Thursday, April 16, 2020

Have more than one route in .NET Core 3.1.4.

You see how the first is the first criteria to fail against, right?

app.UseEndpoints(endpoints =>
{
   endpoints.MapControllerRoute(name: "default", pattern: "api/[controller]");
   endpoints.MapControllerRoute(name: "failover", pattern: "*", defaults: new { controller =
         "FalloverFailsafe", action = "Get" });
});

No comments:

Post a Comment