I have the following API method in a net core 3.0 application
[HttpGet]
[Route("Messages/{MessageId}/English")]
[Route("Messages/{MessageId}/Danish")]
//[Authorize]
public ActionResult Transalte(string MessageId)
{
//Do something based on language
return Ok();
}
Inside the controller I want to use one logic if the URL is Messages/38374/English and use another logic if I use Messages/38374/Danish.
But I don't know how to get English or Danish route value inside the controller.
Any ideas?
Thanks