I have the following route mapping or WEB API
[Route("Foo/Id/{id=1}/bar")]
I want to make Id optional as above, but on the client side, whatever I call it a route doesn't match, and I get 404 I try something like
Foo/Id//bar
But does not work. Is there a way to use additional parameters with web api if the parameter is not at the end?
asp.net-web-api routing asp.net-web-api2
Onur gumus
source share