Closed
Description
The ApiVersionRouteConstraint always returns false when Match is called for URL generation. This breaks URL generation features provided by the UrlHelper and the numerous extensions built on top of it.
For example, assume a route named HelloWorld:
api/v{version:apiVersion}/helloworld
Then:
Url.Link( "HelloWorld", new { version = "1" } );
Should generate:
api/v1/helloworld
However, an exception is thrown instead.