我有以下路线。我想我可以简化它们,但我不确定如何。有人可以给我一些建议吗?这些路线中 id = ... 的原因是什么。如果我的方法中没有任何 id 参数,那么这是在做什么吗?
context.MapRoute(
"Admin_test",
"Admin/Tests",
new { controller = "Contents", action = "Tests", id = UrlParameter.Optional }
);
context.MapRoute(
"Admin_menus",
"Admin/Menus",
new { controller = "Contents", action = "Menus", id = UrlParameter.Optional }
);
context.MapRoute(
"Admin_notes",
"Admin/Pages",
new { controller = "Contents", action = "Pages", id = UrlParameter.Optional }
);
context.MapRoute(
"Admin_cores",
"Admin/Cores",
new { controller = "Cores", action = "Cores", id = UrlParameter.Optional }
);
context.MapRoute(
"Admin_default3",
"Admin/References",
new { controller = "References", action = "References", id = UrlParameter.Optional }
);