aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
150 stars 57 forks source link

Templates should use app.UseMvcWithDefaultRoute(); #857

Closed Rick-Anderson closed 7 years ago

Rick-Anderson commented 7 years ago

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.

mlorbetske commented 7 years ago

This issue was moved to dotnet/templating#1180