app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); });
This will match requests for /Home/Index, /Home/Index/123 and /
/Home/Index
/Home/Index/123
/