ASP.NET Core WebAPI default route not working : <p>I've followed several examples suggesting that to set my default route in an ASP.NET Core WebAPI project, I need to replace</p>

<pre><code>app.UseMvc();
</code></pre>

<p>with</p>

<pre><code>app.UseMvc(routes =&gt;
{
    routes.MapRoute(
        name: "default",
        template: "{controller}/{action}",
        defaults: new { controller = "Traders", action = "Get" });
});
</code></pre>

<p>But when I run it defaults to <code>localhost:54321/api/values</code> and it should default to <code>localhost:54321/Traders</code></p>

<p>What's wrong?</p>
