What is use of webapi in asp.net? Web API is a REST based architecture for building highly scalable Http Services which can be consumed by a wide range of clients like browsers, mobiles, tablets etc.
Asp.net Web API is a framework for building highly scalable Http Services which can be consumed by a wide range of clients like browsers, mobiles, tablets etc. It contains the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection. Though it is not a part of the MVC Framework, however, it is a part of the core ASP.NET platform. It supports convention-based CRUD Actions as it works with HTTP verbs GET,POST,PUT and DELETE and returns a Http Status code. WebAPI responses are typically of JSON, XML etc. The Web API's MediaTypeFormatter does the transformation of the WebAPI's responses. Since one of the response type is JSON which is schemalesss, it is easy to consume from the range of clients like browsers, mobiles, tablets etc.
Why we need use this and advantages this? - Used to build simple, non-SOAP-based HTTP Services
- Easy to create REST based services.
- Easy Routing
- It is lightweight framework.
- Easy JSON serialization and de-serialization and it is faster also since it is schemaless.
- Open Source.
Any one post CRUD operations webapi with angularjs Yes. There are plentiful in DNF. To start with please look into
A Beginners Guide to work with ASP.NET Web API and AngularJS (
http://www.dotnetfunda.com/articles/show/3309/a-beginners-guide-to-work-with-aspnet-web-api-and-angularjs ).
Also
CRUD demonstration using WebAPI (
http://www.dotnetfunda.com/articles/show/3341/crud-demonstration-using-webapi-with-aspnet-core-mvc-using-inbuilt-di ) will help.
For more information about Web API and related, please refer
a) Techfunda's ASP.NET MVC > Web API (
https://techfunda.com/howto/asp-net-mvc/web-api )
b) ASP.NET Web API Articles at Dotnetfunda (
http://www.dotnetfunda.com/articles/cat/222/aspnet-web-api )
c) WebAPI Interview questions at Dotnetfunda (
http://www.dotnetfunda.com/interviews/cat/222/aspnet-web-api )
Hope that helps. Let us know if you need further assistance.
--
Thanks & Regards,
RNA Team
Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator