Void

Returns nothing. If the return type is void, the web API simply delivers an empty HTTP response with the status code 204 (No Content).

Status 204 NO Content

Any Entity or Data Type

Any entity type can be used as the return type for a web API action method. The problem here is that we always get the status code 200 (OK) after a successful response.

Status 200 OK

HttpResponseMessage

If the action returns an HttpResponseMessage, the web API automatically converts the return value into an HTTP response message, populating the response with the properties of the HttpResponseMessage object.

HttpResponseMessage

IHttpActionResult

IHttpActionResult was introduced in ASP.NET Web API 2. This is an advanced HttpResponseMessage concept. IHttpActionResult ultimately returns HttpResponseMessage. It provides developers with customization and reusability features.

IHttpActionResult

2X faster apps development ! 

Syncfusion offers over 1,800 components and frameworks for WinForms, WPF, ASP.NET (MVC, Core), UWP, WinUI, .NET MAUI, Xamarin, Flutter, Blazor, JavaScript, Angular, Vue, and React that make developers’ work easier.