C# and ASP.NET Core
Build cross-platform web APIs with C#, .NET and ASP.NET Core.
Beginner · about 45 hours · difficulty 3/5
Learn first: HTTP in Depth
C# on modern .NET is fast, cross-platform (Linux, macOS, Windows) and open source. ASP.NET Core consistently ranks among the fastest mainstream web frameworks, and the tooling (Visual Studio, Rider, the dotnet CLI) is excellent.
What to learn
- The language: classes, records, interfaces, generics, LINQ, nullable reference types,
async/await(C# popularized this pattern). - The
dotnetCLI, project files and NuGet packages. - ASP.NET Core: Minimal APIs or controllers, middleware pipeline, dependency injection, configuration and options.
- Entity Framework Core for database access and migrations.
Where it shines
Enterprise environments, Azure-heavy shops, games backends and teams that want strong typing with high performance.
Pitfalls
- Blocking on async code with
.Resultor.Wait(), which can cause deadlocks and thread starvation. - Letting EF Core generate inefficient queries without checking the SQL it emits.
You are ready to move on when you can build a Minimal API with EF Core, validation, dependency-injected services and tests using WebApplicationFactory.
Key concepts
- C# language and LINQ
- dotnet CLI and NuGet
- ASP.NET Core Minimal APIs
- Middleware and dependency injection
- Entity Framework Core
- async/await pitfalls
Other options for this step
- JavaScript on the Server with Node.js: Learn Node.js, its event loop, npm and a web framework like Express or Fastify to build HTTP APIs.
- Python for Backend Development: Use Python with Django, Flask or FastAPI to build readable, productive web services.
- Go for Backend Services: Learn Go's simple syntax, goroutines and standard library to build fast, easily deployed services.
- Java and the Spring Ecosystem: Build enterprise-grade services with Java, Maven or Gradle and Spring Boot.
- PHP and Laravel: Use modern PHP with Laravel or Symfony, the stack behind a large share of the web.
- Ruby on Rails: Build products quickly with Ruby and Rails' convention-over-configuration approach.
- Rust for High-Performance Backends: Use Rust with Axum or Actix for memory-safe, very fast services, accepting a steeper learning curve.
Mini project
Build an ASP.NET Core Minimal API for a notes app with EF Core on SQLite, then switch the provider to PostgreSQL through configuration only.
Check yourself
Why is calling .Result on a Task inside a request handler considered dangerous?
Free resources
- C# documentation (Microsoft Learn)
- ASP.NET Core documentation (Microsoft Learn)