Skip to content

codewithmukesh/dotnet-webapi-zero-to-hero-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET Web API Zero to Hero - The Complete ASP.NET Core REST API Course

GitHub stars .NET License YouTube

.NET Web API Zero to Hero

The most comprehensive FREE course for mastering ASP.NET Core Web API development — from first principles to production deployment. Every module includes an in-depth article, a YouTube video walkthrough, and a fully runnable .NET 10 project you can clone and experiment with.

This isn't another surface-level CRUD tutorial. You'll learn the patterns, architectures, and practices that real-world .NET teams use to ship production APIs — Clean Architecture, CQRS, Domain-Driven Design, Docker, observability, testing, and more.

Start the Course — Full syllabus, articles, and video walkthroughs.

Course Modules

Module 01 — Getting Started

Build a strong foundation in ASP.NET Core Web API fundamentals.

# Lesson Article Code
1 REST API Best Practices Read restful-api-best-practices
2 File-Based Apps in .NET 10 Read file-based-apps
3 Migrate from .sln to .slnx Read
4 Minimal API Endpoints Read minimal-apis
5 Swagger is Dead — OpenAPI Alternatives Read
6 Global Exception Handling Read global-exception-handling
7 FluentValidation Read fluentvalidation
8 Structured Logging with Serilog Read serilog-logging
9 Middleware & Request Pipeline Read
10 Filters in ASP.NET Core Read
11 Options Pattern Read
12 Dependency Injection Deep Dive Coming Soon

Module 02 — Database Management with EF Core

Master data access, migrations, and advanced EF Core patterns with PostgreSQL.

# Lesson Article Code
1 Web API CRUD with EF Core Read ef-core-crud
2 EF Core Relationships (1:1, 1:N, M:N) Read
3 Pagination, Sorting & Searching Read pagination-sorting
4 Global Query Filters Read
5 Soft Deletes Read soft-deletes
6 Bulk Operations Read bulk-operations
7 Multiple DbContext Read multiple-dbcontext
8 Concurrency Control (Optimistic Locking) Coming Soon concurrency-control
9 Running Migrations Coming Soon running-migrations
10 Seeding Initial Data Coming Soon seeding-data
11 Cleaning Migrations Coming Soon
12 Tracking vs No-Tracking Queries Coming Soon
13 Compiled Queries Coming Soon
14 LeftJoin & RightJoin in LINQ Coming Soon

Module 03 — Advanced API Patterns

Implement production-grade patterns for scalable APIs.

# Lesson Article Code
1 CQRS with MediatR Read cqrs-mediatr

Module 04 — Performance & Caching

Optimize API performance with caching strategies from in-memory to distributed.

# Lesson Article Code
1 In-Memory Caching Read in-memory-caching
2 Distributed Caching with Redis Read distributed-caching
3 HybridCache in ASP.NET Core Read hybridcache

Upcoming Modules

Module Topics
05 — Security & Authentication JWT authentication, OAuth 2.0, authorization policies, API key auth
06 — HTTP Clients & Resilience Refit, Polly, retry policies, circuit breakers
07 — Architecture Clean Architecture, Domain-Driven Design, Vertical Slice Architecture
08 — Observability OpenTelemetry, distributed tracing, health checks, Grafana dashboards, .NET Aspire
09 — Testing Unit tests, integration tests with TestContainers, mocking, TDD
10 — Deployment Containerize .NET Without a Dockerfile, CI/CD with GitHub Actions, production hardening

Quick Start

# Clone the repository
git clone https://github.com/codewithmukesh/dotnet-webapi-zero-to-hero-course.git
cd dotnet-webapi-zero-to-hero-course

# Pick any lesson and run it
cd modules/01-getting-started/minimal-apis-aspnet-core/MinimalApis.ProductCatalog.Api
dotnet run

# Open the API docs
# http://localhost:5000/scalar/v1

Most database lessons require PostgreSQL via Docker:

# From any lesson folder that has a docker-compose.yml
docker compose up -d
dotnet run --project <ProjectName>.Api

What You'll Learn

  • Build production-ready REST APIs with ASP.NET Core 10 and Minimal APIs
  • Master Entity Framework Core 10 — CRUD, migrations, seeding, relationships, bulk ops, soft deletes, concurrency
  • Implement global exception handling with RFC 9457 ProblemDetails
  • Validate requests with FluentValidation and built-in .NET 10 validation
  • Set up structured logging with Serilog, Seq, and correlation IDs
  • Secure APIs with JWT tokens, OAuth 2.0, and role-based authorization
  • Apply Clean Architecture, CQRS, and Domain-Driven Design
  • Add Redis caching and performance optimization
  • Build resilient HTTP clients with Refit and Polly
  • Write unit tests and integration tests with xUnit and TestContainers
  • Monitor APIs with OpenTelemetry, health checks, and metrics
  • Deploy with Docker and CI/CD pipelines

Who Is This For?

Audience Why This Course
Beginners Start from REST fundamentals and build up to production patterns step by step
C# Developers Go beyond basic CRUD — learn the architecture and patterns used in enterprise .NET
Students Build a portfolio of real-world API projects and prepare for .NET developer interviews
Framework Upgraders Migrate from .NET Framework to modern .NET 10 with confidence
Full-Stack Developers Learn to build robust backend APIs to power your frontend applications

Tech Stack

Technology Purpose
.NET 10 Runtime & SDK
ASP.NET Core Web API framework
Entity Framework Core 10 ORM & data access
PostgreSQL 17 Primary database
Serilog Structured logging
FluentValidation Request validation
Scalar OpenAPI documentation UI
Docker Containerization

Repository Structure

modules/
├── 01-getting-started/                    # REST, Minimal APIs, error handling, logging
│   ├── restful-api-best-practices-for-dotnet-developers/
│   ├── file-based-apps/
│   ├── minimal-apis-aspnet-core/
│   ├── global-exception-handling/
│   ├── fluentvalidation-in-aspnet-core/
│   └── structured-logging-with-serilog-in-aspnet-core/
│
├── 02-database-management-with-ef-core/   # EF Core CRUD, migrations, advanced patterns
│   ├── aspnet-core-webapi-crud-with-entity-framework-core-full-course/
│   ├── pagination-sorting-searching-aspnet-core-webapi/
│   ├── bulk-operations-efcore/
│   ├── soft-deletes-efcore/
│   ├── multiple-dbcontext-efcore/
│   ├── concurrency-control-optimistic-locking-efcore/
│   ├── running-migrations-efcore/
│   └── seeding-initial-data-efcore/
│
├── 03-advanced-api-patterns/              # CQRS, MediatR, advanced patterns
│   └── cqrs-and-mediatr-in-aspnet-core/
│
├── 04-performance-and-caching/            # In-memory, Redis, HybridCache
│   ├── in-memory-caching-in-aspnet-core/
│   ├── distributed-caching-in-aspnet-core-with-redis/
│   └── hybridcache-in-aspnet-core/
│
archive/                                   # Legacy .NET 8 samples (for reference)

Prerequisites

  • C# fundamentals — basic syntax, classes, async/await
  • .NET 10 SDK installed
  • Docker Desktop for database lessons
  • IDE — Visual Studio 2022+, VS Code with C# Dev Kit, or JetBrains Rider

FAQ

Is this course really free?

Yes — 100% free, forever. All articles, videos, and source code are open and accessible. No hidden paywalls, no premium tiers.

What version of .NET does this use?

All current modules target .NET 10. The archive/ folder contains legacy .NET 8 samples for reference. The course will continue to be updated as new .NET versions release.

Do I need prior ASP.NET Core experience?

No. The course starts from REST fundamentals and builds up progressively. Basic C# knowledge is the only prerequisite.

How is this different from other .NET API courses?

Most courses stop at CRUD. This one covers what you actually need in production — global exception handling, structured logging, concurrency control, bulk operations, soft deletes, Clean Architecture, testing, Docker deployment, and observability. Every lesson includes production-ready code you can use in real projects.

Can I use this code in my own projects?

Absolutely. Everything is MIT licensed. Use it to learn, reference, or build upon.

How often is new content added?

New lessons are published regularly. Star the repo and subscribe to the newsletter to get notified.

Stay Connected

Support the Project

If this course helps you become a better .NET developer, give it a star — it helps others discover this free resource.

Star this repo


Start Learning Now | Built by Mukesh Murugan

License

This project is licensed under the MIT License.