← .NET Core learning path
.NET Core · Module 3 of 10

ASP.NET Core fundamentals

Understand Program.cs, hosting and the request pipeline.

📖 Key ideas

  1. Program.cs builds and configures the app: var builder = WebApplication.CreateBuilder(args).
  2. Kestrel is the built-in cross-platform web server.
  3. app.MapGet("/", () => "Hello") creates a minimal API endpoint.
  4. Configuration from appsettings.json, environment variables and user secrets.
  5. Environments: Development, Staging, Production.
💡 Real-life example: Program.cs is the opening checklist of a shop: hire staff (services), set up counters (middleware), open doors (run).
Program.csApp entry and configuration
KestrelBuilt-in web server
Minimal APILightweight endpoints with MapGet etc.
appsettings.jsonConfiguration file