Create Api controller and action



Web API Controller

We created Web API with MVC project in the previous section where it generated a simple controller. Here, you will learn about Web API Controller in detail. Web API Controller is similar to ASP.NET MVC controller. It handles incoming HTTP requests and send response back to the caller. Web API controller is a class which can be created under the Controllers folder or any other folder under your project's root folder. The name of a controller class must end with "Controller" and it must be derived from System.Web.Http.ApiController class. All the public methods of the controller are called action methods. #Web #API #Restful #Service #RestAPI #core #API2

Post a Comment

Previous Post Next Post