Asp.net core MVC make action optional in routing

Asp.net core MVC make action optional in routing

 

endpoints.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

2021-10-03