Templates should use app.UseMvcWithDefaultRoute();
Rick-Anderson opened this issue · comments
Rick Anderson commented
I recommend the templates use app.UseMvcWithDefaultRoute();
rather than
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller}/{action=Index}/{id?}");
});
The more complex code is a barrier to entry for new users who don't need this flexibility. Advanced users will have no problem adding the above code when they need it. The code above doesn't make much sense to Razor Pages developers. Recommend this change for all templates but especially for the Razor Pages template.
cc @DamianEdwards - part of the lower the barrier to entry effort.
Mike Lorbetske commented
This issue was moved to dotnet/templating#1180