Updated Jun 23, 2026

ASP.NET Core From Zero

ASP.NET Core is Microsoft's modern web framework - cross-platform, fast, and open source - and it sits under an enormous share of enterprise backends. If you write C# on the server, this is almost certainly the framework you'll use. The modern version is a clean break from the old .NET Framework days: it runs on Linux and macOS as happily as Windows, it's genuinely quick, and since .NET 6 it offers minimal APIs that let you stand up an endpoint in a few lines - no ceremony required.

The mental model has two pillars that hold up everything else. First, a request flows through a middleware pipeline - an ordered chain where each piece can act on the request, pass it along, and act on the response coming back. Second, your code gets its dependencies through dependency injection: you register services in one place, and the framework hands them to whatever needs them. Learn "requests flow through a pipeline, and services are injected," and the rest of ASP.NET Core - routing, binding, auth - is detail that hangs off those two ideas.

📝 This teaches the framework - it assumes you know C#: classes, interfaces, generics, async/await, and records (C# From Zero). It pairs with What a Framework Even Is; its data layer is EF Core; and the server + pipeline beneath it are the roots guide The ASP.NET Pipeline & Kestrel. It compiles and runs as a .NET program, so examples are shown with the commands to run them.

How to read this

Read in order - it grows one service (a small products API) from a single endpoint to a tested, deployable REST API. Phases carry difficulty badges.

The phases

Part 1 - The core (🟢 Basic → 🟡)

  1. What ASP.NET Core Is & Your First Server 🟢 - the framework, minimal APIs, and a running app in a few lines.
  2. Routing & Minimal APIs 🟢 - MapGet/MapPost, route and query params, and route groups.
  3. Model Binding & Validation 🟡 - binding the body/route/query to types, and validating with data annotations.

Part 2 - A real app (🟡 → 🔴) 4. Dependency Injection 🟡 - registering services, lifetimes, and constructor injection. 5. The Middleware Pipeline 🔴 - Use/Run/Map, ordering, and writing your own middleware. 6. Building a REST API 🟡 - full CRUD with Results, DI, and a service. 7. Authentication & Authorization 🔴 - JWT bearer auth, [Authorize], and protecting endpoints.

Part 3 - Ship it (🟡 → 🟢) 8. Testing & Production 🟡 - WebApplicationFactory integration tests, config, and deployment. 9. Where to Go Next 🟢 - minimal APIs vs controllers, EF Core, Blazor, and what to build.

The throughline: a request travels a middleware pipeline to an endpoint, and your code receives its collaborators through dependency injection. Hold those two and ASP.NET Core is approachable.


Phase 1: What ASP.NET Core Is & Your First Server →