ASP.NET Core in Action
858 pages
English
PDF
4.5

ASP.NET Core in Action

ASP.NET Core in Action

Author:

Year:

Summary:

Introduction

The book «ASP.NET Core in Action» by Andrew Lock is one of the most comprehensive and up-to-date guides on modern web development on the .NET platform. Published in 2021 (second edition), it covers ASP.NET Core 5.0, but the principles laid out remain relevant for newer versions (6, 7, 8). The book is 858 pages of dense technical text, which reads surprisingly easily thanks to lively language and an abundance of practical examples.

Despite the fact that the PythonLib site is primarily dedicated to Python, many developers sooner or later face the need to switch to C# or learn backend development on another platform. This review will help you understand whether it's worth spending time on this book if you are already familiar with Python but want to broaden your horizons towards ASP.NET Core.

What the book is about

The book is structured as a sequential guide from basics to advanced topics. The author starts with installing tools and creating a first application, then gradually delves into the architecture of ASP.NET Core.

Main topics covered in the book:

  • Introduction to ASP.NET Core: what middleware is, the request pipeline, configuration, and environments.
  • MVC (Model-View-Controller): routing, controllers, views (Razor), models, and data binding.
  • Razor Pages: an alternative approach to creating pages without full MVC.
  • REST API and Web API: creating API controllers, versioning, documentation (Swagger).
  • Entity Framework Core: working with databases, migrations, LINQ queries.
  • Security: authentication (Identity, JWT), authorization, protection against CSRF and XSS.
  • Testing: unit and integration tests, mock objects.
  • Deployment: publishing to IIS, Docker, Azure.

Who this book is for

The book is intended for developers already familiar with C# and the basics of .NET. If you come from the Python world, you will need to first learn C# syntax (for example, from the book «C# 9.0 in a Nutshell»). However, if you write confidently in Python and want to learn ASP.NET Core for commercial development, this book will be an excellent bridge — it doesn't waste time explaining basic programming concepts but gets straight to the point.

What the reader will learn

  • How the request processing pipeline (middleware) works and how to create custom components.
  • How to design application architecture using dependency injection (DI).
  • How to create RESTful APIs with support for versioning and documentation.
  • How to work with databases via Entity Framework Core, including migrations and query optimization.
  • How to implement authentication and authorization using Identity Server and JWT.
  • How to write tests for controllers, middleware, and services.
  • How to deploy a finished application in the cloud or on your own server.

Strengths

1. Practical focus. Each chapter contains many code examples that can be immediately run and modified. The author doesn't just explain theory but shows how to solve real-world problems.

2. Structured approach. The book is divided into 5 parts and 30 chapters, each ending with a brief summary. This allows it to be used as a reference — you can skip familiar topics and return to the needed chapter later.

3. Relevance. The second edition (2021) covers ASP.NET Core 5.0, but all concepts (middleware, DI, configuration) remain unchanged in .NET 6/7/8. The author also mentions changes that will appear in future versions.

4. Clear language. Andrew Lock writes in simple English (in the original), avoiding excessive academic jargon

Recommendations