Я пытаюсь перенаправить URL с параметром и без параметра на два разных метода, но по какой-то причине он всегда запускается первым.
Вот код контроллера:
public class ProductController : Controller
{
[Route("")]
[Route("Product")] //If i delete this one then it works how it is intended
public IActionResult Index()
{
//It always start this one
....
}
[Route("Product/{GroupID?}")]
public IActionResult Index(int GroupID)
{
....
}
}