let's say I have a movie controller to support two Get requests as below:
A. Get /movies/{movieId}
B. Get /movies/{genre}
movie id is Guid
(e.g bff4c605-7ae4-76767-bcf8-12345f621bfd), not int type.
So when a request is made to the backend, movieId and genre are both of string, so how can I specify a requirement that if second url segment can be casted to Guid, then route it to Get A's action method, if it can only be casted to genre string then route it to the Get B's action method?
You can specify parameter constraints in the route pattern: