How Can We Provide an Alias Name for ASP.NET Web API Action?

Technology CommunityCategory: ASP.NET Web APIHow Can We Provide an Alias Name for ASP.NET Web API Action?
VietMX Staff asked 3 years ago

We can provide an alias name for ASP.NET Web API action same as in case of ASP.NET MVC by using ActionName attribute as follows:

[HttpPost]
[ActionName("SaveStudentInfo")]
public void UpdateStudent(Student aStudent)
{
      StudentRepository.AddStudent(aStudent); 
}