ASP.NET Core From Zero
Learn Microsoft's modern, cross-platform web framework: minimal APIs and your first server, routing, model binding and validation, dependency injection, the middleware pipeline, building a REST API, authentication, and testing and production. The framework behind a huge share of enterprise backends, taught mental-model-first.
- What ASP.NET Core Is & Your First Server ASP.NET Core is Microsoft's modern, cross-platform web framework. A request flows through a middleware pipeline to your code, which gets services via dependency injection. Build and run a minimal API.
- Routing & Minimal APIs How ASP.NET Core matches a request to your code: MapGet/MapPost and friends, binding route and query parameters, returning the right status with Results, and grouping endpoints with MapGroup.
- Model Binding & Validation How ASP.NET Core turns a raw HTTP request into typed C# parameters, and how to check those values with data annotations — including the honest minimal-API gotcha that validation isn't automatic.
- Dependency Injection Register services against interfaces in one place and let the framework construct and supply them. Covers the three lifetimes, constructor and handler injection, and the captive-dependency trap.
- The Middleware Pipeline How a request flows through an ordered chain of middleware — Use, Run, and Map — why ordering is everything, how to short-circuit, and how to write your own.
- Building a REST API Assemble routing, model binding, validation, and DI into a full CRUD products API — five endpoints over one collection, backed by a thread-safe in-memory repository and returning typed Results.
- Authentication & Authorization JWT bearer auth in ASP.NET Core: the who-then-what mental model, validating tokens, the all-important middleware order, and protecting endpoints with Authorize, policies, and roles.
- Testing & Production Test the whole app in memory with WebApplicationFactory and HttpClient, override services for fakes, layer configuration with appsettings and ASPNETCORE_ENVIRONMENT, then publish and ship behind Kestrel in a small Docker image.
- Where to Go Next You can build a real ASP.NET Core API end to end. Now the honest map: minimal APIs vs controllers, EF Core, Blazor, SignalR and gRPC, the roots, and what to build.