Summary

ASP.NET Core provides the necessary infrastructure you need to create powerful RESTful APIs. In this chapter you learned how to create controllers and actions that respond to HTTP requests, and return HTTP responses that you control.

I've introduced two popular tools: Fiddler and Postman, and you'll find them very useful when you create and debug your API applications. You've seen how to configure the routing in your application in two ways — conventional and attribute-based — and how to map values in the request's URL to parameters.

You've learned what the meaning of the M, MVC is, and how to bind the data from the request to the model classes.

You've also seen how easy it is to define validation rules on your model types, and how ASP.NET Core automatically validates these rules. We've also covered the different possibilities that you have for generating responses from your action methods, and shown some helper methods that the controller base class provides to assist you with generating the response types. In Chapter 5, Persisting Data with Entity Framework, we'll explain how you can work with a database to store and query your application state.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.251.57