Summary
Middleware is a useful tool for developers dealing with cross-cutting concerns. This is because it intercepts and enhances every incoming request and outgoing response, and it can increase performance with early-return requests. Concepts from logging to authentication should be handled by using middleware. The topics covered in the chapter provided you with the necessary knowledge to understand the middleware-first approach taken by the ASP.NET Core framework. Furthermore, the chapter also gave an overview of the built-in middleware of ASP.NET Core, and it described how to create custom middleware.
In the next chapter, we will explore another core topic for increasing the maintainability and testability of our code: dependency injection ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access