What are the advantages of using C# ASP.NET WebAPI?

WEB API is a better choice for simpler, light weight services. WEB API can use any text format including XML and is faster than WCF.

  • It works the way HTTP works using standard HTTP verbs like GET, POST, PUT, DELETE for all the crud operation.

  • Complete Support for routing

  • Response generated in Json and XML format using MediaTypeFormatter.

  • It has the ability to be hosted in IIS as well as self-host outside of IIS.

  • Supports Model binding and Validation.

  • Support for ODATA.

  • Supports stateless transfer of data.

  • Supports Url patterns and Http methods.

Note − ODATA (Open Data Protocol )is an open protocol which allows the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.