How to Use Custom Action Names in ASP.NET Web API

WebAPI action methods use the same HTTP method name that they are serving by default. If you deal with HTTP GET method, the Web API has the Get() action method. However, you need to customize these action method names so it is more readable to you and to the other coders.

You can customize action method names in different ways.

By creating a sample Web API.
Creating action methods by prefixing with HTTP method.
Use attributes to specify HTTP method and action method mapping.
Using the [ActionName] attribute

and many others.

Read the rest of the post here: http://www.codeguru.com/csharp/.net/using-custom-action-names-in-asp.net-web-api.htm

Leave a Reply

Your email address will not be published. Required fields are marked *