C# を使用した MVC でのルーティングに関する情報を探しています。私は現在、MVC でのルーティングの基本をよく知っていますが、探しているものを見つけるのはやや困難です。
事実上、私が見つけたいのは、単一のパラメーターを取る単一のルートを定義する方法です。
オンラインで見つけた一般的な例はすべて、例に基づいています
routes.MapRoute(
"Default",
"{controller}.mvc/{action}/{id}"
new { controller = "Default", action="Index", id=""});
By mapping this route, you can map to any action in any controller, but if you want to pass anything into the action, the method parameter must be called "id". I want to find a way around this if it's possible, so that I don't have to constantly specify routes just to use a different parameter name in my actions.
Has anyone any ideas, or found a way around this?