Modern .NET Core, C# & Enterprise Microservices

Asynchronous Streams, Kestrel Web Server & EF Core

7 modules, 34 lessons: C Sharp And .NET Fundamentals; Solutions Projects And Configuration; Routing Controllers And Minimal APIs; Data Access And Mapping; Validation Errors And OpenAPI; Authentication Authorization And Resiliency; Testing Telemetry And Publishing.

Intermediate · 2 hours · 34 lessons · 105 labs

Who it is for

Intermediate level.

For developers who already use an object-oriented language such as Java, TypeScript or C++ and want to build a production-ready web API in C# and .NET.

What you don't need yet:

What helps:

Before you start:

Take first:

Take next:

Learning paths:

Nobody needs to know everything before they start. Each course builds on the one before, so a learning path takes you there step by step.

Labs

105 labs, 24 of them graded: you write the code, it runs, and graded labs check the result. The outline lists each lesson's labs.

What is free

Start free: First 3 lessons free with an account. Pro: Every course, lab, handbook, practice exam and certificate.

Course outline

C Sharp And .NET Fundamentals

  1. What is .NET? Runtime vs SDK, and LTS vs STS (5 labs): You can tell the .NET runtime apart from the SDK, read a csproj target framework, and choose between an LTS and an STS release.
  2. The C# Language: Types, Variables, and Flow Control (8 labs): Read and write everyday C# declarations, numeric choices, nullability and control flow without guessing what the compiler will do.
  3. Classes, Interfaces, and Object-Oriented C# (7 labs): You can model a domain with properties, interfaces and constructor injection, and tell when inheritance is the wrong tool.
  4. Collections, Generics, and LINQ (6 labs): You can pick the right collection, write generic and LINQ queries, and keep a query deferred until the moment it should run.
  5. Async and Await: Managing Concurrency (5 labs): Write async methods that free the request thread, cancel cleanly, overlap independent work and surface their exceptions.
  6. Records, Pattern Matching, and Modern C# (7 labs): You can read and write modern C#: records, pattern matching, switch expressions and the everyday syntax the rest of the course relies on.

Solutions Projects And Configuration

  1. Solutions, Projects, and Target Frameworks (2 labs): You can explain what a solution and project contain, choose a target framework, and read the important parts of a project file.
  2. Directory.Build.props, global.json and Central Packages (4 labs): You can make a repository use one SDK, one set of shared build properties, and one source of truth for package version.
  3. Code Quality: .editorconfig and Roslyn Analyzers (3 labs): You can configure formatting and analyzer severity in the repository, then fix the diagnostics that protect an API from avoidable defects.
  4. The Dependency Injection Container: Scopes and Lifetimes (3 labs): You can register services with the built in container and choose transient, scoped, or singleton lifetime without leaking state across requests.
  5. The Options Pattern: Strongly Typed Configuration (7 labs): You can turn a configuration section into a validated options class, choose between the three options interfaces, and make a bad setting stop the host at start up rather than at request time.
  6. Environment Layering and User Secrets (3 labs): You can layer configuration by environment and keep local secrets out of source control.

Routing Controllers And Minimal APIs

  1. The ASP.NET Core Middleware Pipeline (2 labs): You can describe request flow and place middleware in the order that makes authentication, errors, and endpoints behave correctly.
  2. Building Routes with Controllers (2 labs): You can build a controller route with binding, validation, and explicit HTTP results.
  3. Building Routes with Minimal APIs (2 labs): You can build the catalog route surface with minimal APIs, typed binding, endpoint metadata, and explicit results.
  4. Comparing Controllers and Minimal APIs (2 labs): You can choose between controllers and minimal APIs by comparing the same runnable route surface rather than relying on taste.

Data Access And Mapping

  1. Entity Framework Core: Code First and Migrations (2 labs): You can model an entity, register a DbContext, and use migrations to evolve a database schema safely.
  2. Querying, Change Tracking, and Saving Data (2 labs): You can query efficiently, choose tracking deliberately, and save an update through EF Core.
  3. The Repository Pattern (2 labs): You can decide where a repository helps, define a focused interface, and avoid hiding useful query behavior.
  4. Manual Object Mapping (2 labs): You can map persistence entities to request and response records explicitly and safely.
  5. Source-Generated Mapping with Mapperly (2 labs): You can use Mapperly for compile-time mapping while keeping the mapping contract and dependencies explicit.

Validation Errors And OpenAPI

  1. Model Validation and FluentValidation (2 labs): You can validate API input at the boundary and return useful field errors without putting validation in handlers.
  2. Global Exception Handling and Problem Details (2 labs): You can turn expected and unexpected failures into consistent problem details without leaking implementation data.
  3. OpenAPI Generation in .NET 9 (2 labs): You can generate and expose an OpenAPI document with AddOpenApi and MapOpenApi.
  4. API Documentation UI with Scalar (2 labs): You can add Scalar as a documentation UI over the built in OpenAPI document.

Authentication Authorization And Resiliency

  1. Authentication: JWTs and Claims (2 labs): You can validate a bearer token and read claims from the authenticated user.
  2. Role-Based and Policy-Based Authorization (2 labs): You can protect endpoints with roles and named policies based on claims.
  3. Built-in Rate Limiting Middleware (2 labs): You can define a partitioned rate limit and return a useful response when a client exceeds it.
  4. Health Checks (2 labs): You can expose liveness and readiness checks without making a failing dependency look like a dead process.
  5. Retry and Circuit Breaker Policies with Polly (2 labs): You can add bounded retries and circuit breaking to outbound HTTP calls without multiplying an outage.

Testing Telemetry And Publishing

  1. Unit Testing with xUnit and NSubstitute (2 labs): You can isolate an application service with a substitute and write a focused xUnit test.
  2. Integration Testing with WebApplicationFactory (2 labs): You can test routing, serialization, and middleware through an in memory ASP.NET Core host.
  3. Behavior-Driven Development with Reqnroll (2 labs): You can write a readable Reqnroll scenario and connect its steps to the application boundary.
  4. OpenTelemetry, Container Publishing and Trimming (3 labs): You can add traces and metrics, publish a container, and choose trimming only after measuring compatibility.