4
I have a control that manages videos. I’m trying to make these two methods:
[Route("video/categoria/{categoria}")]
public async Task<ActionResult> Index(string categoria)
{
}
[Route("video/categoria/new-movies")]
public async Task<ActionResult> Index()
{
}
When you run the url /video/categoria/new-movies
it falls on the route [Route("video/categoria/{categoria}")]
putting the value new-movies
within the category variable.
I wonder if there’s any way he could land on the other route.
If it does not exist, it is best to treat everything in the same method?
I seek a more technically correct solution to avoid future problems and facilitate maintenance.
It worked and I will mark as a response, you could put as a second suggestion the part of how I would set up this specific case, please?
– Ricardo
Ready. Now it’s complete.
– Leonel Sanches da Silva
Thanks! Still have to wait 5 min to mark the response.
– Ricardo
Quiet. No rush.
– Leonel Sanches da Silva