This chapter describes how to deal with controllers and actions in a web service stack. Controllers are a fundamental part of ASP.NET Core; they are the entry point of the HTTP requests. In this chapter, we will look closely at the mechanics of the controller classes and how they can transfer information to the client using the HTTP protocol.
This chapter covers the following topics:
- What is a controller?
- Handling requests using controllers and actions
- How to deal with DTO objects
- Implementing validation
By the end of the chapter, the reader will have a general overview of the web stack provided by ASP.NET Core and will know how to deal with incoming HTTP requests using controllers and actions.