My default routing follows {controller}/{id}/{action}
instead of the standard {controller}/{action}/{id}
Now i need to set up the defaults such that if no id is provided, default to Index action in controller
If Id is provided and no action is provided, default to Detail action
If both Id and Action is provided then route to the corresponding action.
How can I set up this routing?
currently:
routes.MapRoute(
name: "Default",
url: "{controller}/{id}/{action}",
defaults: new { controller = "projects", action = "Index" })