# C# and ASP.NET Core

> Build cross-platform web APIs with C, .NET and ASP.NET Core. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/backend/csharp
Last updated: 2026-11-28

Build cross-platform web APIs with C#, .NET and ASP.NET Core.

Beginner · about 45 hours · difficulty 3/5

Learn first: [HTTP in Depth](https://www.internhack.in/roadmaps/tracks/backend/http-protocol)

**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 `dotnet` CLI, 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 `.Result` or `.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](https://www.internhack.in/roadmaps/tracks/backend/nodejs): Learn Node.js, its event loop, npm and a web framework like Express or Fastify to build HTTP APIs.
- [Python for Backend Development](https://www.internhack.in/roadmaps/tracks/backend/python): Use Python with Django, Flask or FastAPI to build readable, productive web services.
- [Go for Backend Services](https://www.internhack.in/roadmaps/tracks/backend/go): Learn Go's simple syntax, goroutines and standard library to build fast, easily deployed services.
- [Java and the Spring Ecosystem](https://www.internhack.in/roadmaps/tracks/backend/java): Build enterprise-grade services with Java, Maven or Gradle and Spring Boot.
- [PHP and Laravel](https://www.internhack.in/roadmaps/tracks/backend/php): Use modern PHP with Laravel or Symfony, the stack behind a large share of the web.
- [Ruby on Rails](https://www.internhack.in/roadmaps/tracks/backend/ruby): Build products quickly with Ruby and Rails' convention-over-configuration approach.
- [Rust for High-Performance Backends](https://www.internhack.in/roadmaps/tracks/backend/rust): 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](https://learn.microsoft.com/en-us/dotnet/csharp/) (Microsoft Learn)
- [ASP.NET Core documentation](https://learn.microsoft.com/en-us/aspnet/core/) (Microsoft Learn)

Previous: [Java and the Spring Ecosystem](https://www.internhack.in/roadmaps/tracks/backend/java) · Next: [PHP and Laravel](https://www.internhack.in/roadmaps/tracks/backend/php)

## More in Pick One Server Language

- [JavaScript on the Server with Node.js](https://www.internhack.in/roadmaps/tracks/backend/nodejs)
- [Python for Backend Development](https://www.internhack.in/roadmaps/tracks/backend/python)
- [Go for Backend Services](https://www.internhack.in/roadmaps/tracks/backend/go)
- [Java and the Spring Ecosystem](https://www.internhack.in/roadmaps/tracks/backend/java)
- [C# and ASP.NET Core](https://www.internhack.in/roadmaps/tracks/backend/csharp)
- [PHP and Laravel](https://www.internhack.in/roadmaps/tracks/backend/php)
- [Ruby on Rails](https://www.internhack.in/roadmaps/tracks/backend/ruby)
- [Rust for High-Performance Backends](https://www.internhack.in/roadmaps/tracks/backend/rust)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
