For my ASP.NET Core 6.0 MVC web application, I need both:
http://example.com/users/7 and
http://example.com/users?userid=7
My current controller looks like this:
    [HttpGet("users/{userId}")]
    public IActionResult GetUser(int userId)
    { ... }
The first call works, the second returns a 404.
I wonder why... and what do I need to do to fix this (allow both calls)?

http://example.com/users?userId=7(capitalized "I" in the "userId" name for query string parameter)