User Routing


ASP.NET (Core) MVC Actions Routing Public New

Easy 

3min


Consider the following code sample:

public class UserController : Controller
{
    [Route("/user")]
    public IActionResult GetUser()
    {
        return Content("Ask for specific user on URL: /user/{userId}");
    }

    [Route("/user/{userId}")]
    public IActionResult GetUserById(string userId)
    {
        return Content($"User with id: {userId}");
    }
}

Select which of the following URLs that will be routed to the GetUserById method.

(multiple correct answers possible)