ASP.NET Core Minimal APIs in C#

Build Production-Ready RESTful APIs with Modern .NET

Master the art of building lightweight, high-performance APIs using ASP.NET Core Minimal APIs.

ASP.NET Core Minimal APIs have faster startup times, less boilerplate, and superior performance compared to traditional MVC controllers.

Learn the streamlined approach that reduces boilerplate code while maintaining enterprise-grade quality, security, and performance.

Move beyond basic CRUD operations. This hands-on course covers authentication, authorization, testing, error handling, logging, performance optimization, and architectural patterns—everything needed to build production-ready APIs that scale.

Target audience

  • Backend developers wanting to master modern API development with .NET
  • C# developers ready to adopt Minimal APIs for new projects
  • ASP.NET developers upgrading from traditional controllers or older .NET versions
  • Full-stack developers needing a solid foundation in API design and implementation
  • Software architects evaluating Minimal APIs for microservices or enterprise systems

Prerequisites

Basic C# knowledge (6+ months experience). Understanding of HTTP and REST concepts helpful but not required.

Rick Beerendonk - instructor of the course

30+ years software development experience, senior consultant at Oblicum, Microsoft MVP. Has trained thousands of developers across Europe in .NET, modern web development, API design, and software architecture.

What You'll Master

01. Introduction to Minimal APIs

  • Minimal APIs vs MVC controllers comparison
  • Performance characteristics and benchmarks
  • When to use Minimal APIs

02. Environment Setup

  • .NET SDK installation and verification
  • IDE setup (Visual Studio, VS Code, Rider)
  • Project structure and organization

03. ASP.NET Core Fundamentals

  • ASP.NET Core architecture
  • Program.cs and WebApplication
  • Middleware pipeline
  • Configuration system (appsettings.json, environment variables, user secrets)

04. Building Minimal API Endpoints

  • Endpoint definitions and lambda expressions
  • Route templates, parameters, and constraints
  • HTTP verbs (GET, POST, PUT, DELETE, PATCH)
  • Request binding (route, query, body, headers, forms)
  • Response serialization and content negotiation

05. Results and Response Types

  • IResult interface fundamentals
  • Results vs TypedResults comparison
  • Common result types (Ok, Created, NotFound, BadRequest, NoContent)
  • Custom result types and content negotiation
  • Proper HTTP status codes and headers
  • OpenAPI documentation benefits

06. OpenAPI and Documentation

  • OpenAPI/Swagger setup and configuration
  • Testing endpoints with Swagger UI
  • Customizing API documentation with XML comments
  • API versioning strategies
  • Generating client code from OpenAPI specs

07. Middleware and Filters

  • Middleware pipeline
  • Custom middleware patterns (inline, class-based, factory-based)
  • Endpoint filters for request/response manipulation
  • Filter ordering and execution flow
  • When to use middleware vs filters

08. Validation

  • DataAnnotations for simple validation
  • FluentValidation for complex scenarios
  • Custom validators for business rules
  • Endpoint filters for validation

09. Dependency Injection

  • DI fundamentals in ASP.NET Core
  • Service lifetimes (transient, scoped, singleton)
  • Constructor injection in endpoints
  • Options pattern for configuration

10. Entity Framework Core

  • EF Core setup and DbContext configuration
  • Entity modeling and relationships (one-to-many, many-to-many)
  • Migrations workflow
  • LINQ queries (filtering, sorting, projection, aggregation)
  • IQueryable vs IEnumerable

11. Clean Architecture

  • Layered architecture
  • Domain, Application, Infrastructure, and API layers
  • Dependency inversion
  • Project structure

12. Repository Pattern

  • Repository pattern
  • Generic repository implementation
  • Unit of Work pattern
  • EF Core integration

13. Testing

  • Unit testing
  • Mocking
  • Testing Minimal API endpoints
  • Integration testing with WebApplicationFactory
  • Testing authenticated endpoints
  • AAA (Arrange-Act-Assert) pattern

14. Authentication

  • ASP.NET Core Identity setup
  • JWT token generation and validation
  • User registration and login endpoints
  • Refresh token patterns

15. Authorization

  • Role-based authorization
  • Policy-based authorization
  • Claims and custom policies
  • [Authorize] attribute

16. Error Handling

  • Global exception middleware
  • Problem Details (RFC 7807)
  • Custom exception types
  • Development vs production error details

17. Logging

  • Structured logging with Serilog
  • Log levels
  • Multiple sinks (console, file, database)
  • Correlation IDs

18. Code Organization

  • Extension methods for endpoint registration
  • Route groups and prefixes
  • Vertical slice architecture
  • Feature-based organization

19. Performance Optimization

  • Response caching strategies
  • In-memory caching with IMemoryCache
  • Distributed caching concepts
  • Rate limiting and throttling
  • EF Core query optimization (AsNoTracking, compiled queries)
  • Async/await patterns

20. Deployment and Production

  • Health checks
  • CORS configuration
  • Environment-specific configuration
  • Background services and hosted services
  • Azure deployment
  • Monitoring

21. Why Minimal APIs?

Less Boilerplate:

  • Fewer files and classes to manage
  • Direct route-to-handler mapping
  • Reduced ceremony for simple endpoints

Better Performance:

  • Faster startup times
  • Reduced memory footprint
  • Optimized for high-throughput scenarios

Modern C# Features:

  • Leverages latest C# language features
  • Functional programming patterns
  • Strong typing with type inference

Perfect for:

  • Microservices architecture
  • Serverless functions
  • Lightweight APIs
  • High-performance scenarios
  • Modern cloud-native applications

1. Hva lærer jeg på dette kurset?
Du lærer å bygge moderne, høytytende og produksjonsklare RESTful APIs med ASP.NET Core Minimal APIs. Kurset dekker hele stacken fra grunnleggende konsepter til avansert API-arkitektur, inkludert:

  • Minimal API-design, routing og request/response-håndtering
  • Autentisering, autorisasjon og sikkerhet
  • Dokumentasjon med OpenAPI/Swagger
  • Testing, logging og feilhåndtering
  • Datatilgang med Entity Framework Core
  • Clean Architecture, repository pattern og code organization
  • Performance-tuning, caching og optimaliserte queries

Målet er at du sitter igjen med ferdigheter til å bygge robuste API-er som fungerer i enterprise-miljøer.

2. Hvem passer kurset for?
Kurset passer for utviklere og arkitekter som vil bygge moderne API-løsninger med .NET:

  • Backend-utviklere
  • C#-utviklere
  • Fullstack-utviklere
  • ASP.NET-utviklere som vil oppgradere til Minimal APIs
  • Programvarearkitekter som vurderer Minimal APIs for mikrotjenester eller enterprise

3. Trenger jeg forkunnskaper?
Ja, du bør ha:

  • Grunnleggende kunnskap i C# (minimum 6 måneders erfaring)
  • Kjennskap til HTTP/REST er en fordel, men ikke et krav

4. Hva inneholder kurset?
Kurset dekker blant annet:

  • Minimal APIs vs MVC
  • Endpoint design, routing, result types og content negotiation
  • Middleware, filters og validering
  • Dependency Injection og konfigurasjon
  • EF Core, DbContext, LINQ og migrasjoner
  • Clean Architecture, Repository Pattern, Vertical Slice Architecture
  • Unit testing, integration testing og WebApplicationFactory
  • Identity, JWT, policies og claims-basert autorisasjon
  • Logging med Serilog og feilhåndtering med ProblemDetails
  • Caching, rate limiting og performance-optimalisering
  • Azure-deploy, health checks og produksjonsklargjøring

Dette er et tungt praktisk kurs med omfattende hands-on øvelser.

5. Hvilke verktøy og teknologier brukes?
Kurset jobber med et moderne .NET-økosystem:

  • .NET SDK (siste versjon)
  • Visual Studio / VS Code / JetBrains Rider
  • ASP.NET Core Minimal APIs
  • EF Core
  • Serilog
  • OpenAPI/Swagger
  • Azure-verktøy for test og deploy

6. Er kurset praktisk?
Ja, kurset består av mange praktiske øvelser som bygger på hverandre. Du utvikler API-er fra bunnen av og jobber med autentisering, databaser, logging, feilbehandling og deploy—akkurat slik det gjøres i reelle prosjekter.

7. Hvem er instruktøren?
Kurset undervises av Rick Beerendonk – Microsoft MVP, senior konsulent og en av Europas mest erfarne .NET-instruktører. Han har over 30 års erfaring og har trent tusenvis av utviklere i moderne Microsoft-teknologi, arkitektur og API-design.

8. Får jeg kursbevis?
Ja. Deltakere får kursbevis fra Glasspaper etter endt kurs.

9. Hva kan jeg bygge etter dette kurset?
Etter kurset vil du være i stand til å bygge:

  • Produksjonsklare REST API-er
  • Mikrotjenester og cloud-native applikasjoner
  • Sikkerhetskritiske API-er med Identity og JWT
  • Skalerbare datadrevne løsninger med EF Core
  • Velstrukturerte kodebaser med moderne arkitektur

10. Hva gjør Minimal APIs så attraktive?
Minimal APIs gir:

  • Mindre boilerplate
  • Raskere oppstart
  • Høyere ytelse
  • Moderne og funksjonell C#-kode
  • Perfekt for mikrotjenester, serverless og høytlastede API-er

Other relevant courses

25. February
2 days
Classroom
25. February
3 days
Classroom Virtual
5 days
Classroom Virtual
24. March
4 days
Classroom Virtual On Demand