[ASP.NET Controller] No route matches the supplied values
I'm trying to redirect my call to get the animal information from the create action method using this
And this is my GetById Action method
3 Replies
The route param is
animalId
not Id
thanks
It doesnt trigger the breakpoint that set in GetById method ?
IIRC it doesn't actually call that action, because why would it? It just returns the
201 Created
response and sets the Location
header to the route from which you can fetch that resource
That's why it needs the action name and the parameters, to construct that route