Having the Method/Action ObtainValue, I want to assign a different name to the method when it is called, so I use the ActionName attribute
[ActionName("GetValueByID")]
public string ObtainValue(int id)
{
return "value";
}
But I can also use the Route attribute, as shown below
[Route("Api/Values/GetValueByID")]
public string ObtainValue(int id)
{
return "value";
}
So my question is, is there a difference?, should use one or the other? what about if I use both, which one takes precedence?