30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • From Zero to Hero: Minimal APIs in .NET with C#

    Learn how to build efficient, scalable applications with Minimal APIs in .NET. This course covers essential techniques for creating lightweight, high-performance web APIs. Perfect for .NET developers!

    About This Course

    When Minimal APIs were launched with the release of .NET 6, they allowed us to build scalable and fast APIs in .NET in ways that weren't possible before. Not only do they simplify the approach of building APIs and make them more accessible than ever, but they bring an incredible performance boost to the table. Microsoft has gone on record saying that they expect most new .NET APIs to be built using Minimal APIs for a good reason. They are a robust solution that allows developers to express themselves and create the system they need exactly how they want it. So don't miss your chance to master this topic right after its launch.

    Course Curriculum

    3h 33m 8 sections
    Welcome
    01:50 Free preview
    What will you learn in this course?
    01:31 Free preview
    Who is this course for and prerequisites
    01:37 Free preview
    How we’ve been building APIs in .NET until now?
    04:48
    What are Minimal APIs?
    03:53
    Who are Minimal APIs for?
    03:51
    Building the Weather Forecast API using Minimal APIs
    03:32
    Let’s clear a few misconceptions
    02:30
    Configuring URLs and ports
    03:50
    Creating new endpoints
    01:41
    The different return types
    02:24
    Routing requests
    04:05
    Route parameters and rules
    04:37
    Parameter Binding
    09:41
    Special parameter types
    04:50
    Configuring services
    01:45
    Configuring middleware
    02:02
    Custom parameter binding
    08:04
    Available response types
    04:00
    Logging
    01:43
    Adding Swagger support
    01:56
    Controller interoperability
    01:41
    What are we going to build?
    03:04
    Exercise: Build the API
    00:47
    Project setup and database creation
    10:52
    Adding new books
    08:12
    Adding validation
    06:03
    Retrieving all books
    01:43
    Retrieving books by ISBN
    02:53
    Retrieving books by title match
    02:54
    Editing books
    03:41
    Deleting books
    02:14
    Loading custom configuration
    02:22
    Adding Authentication & Authorization
    05:52
    Named routes and link generation
    04:48
    Customizing the Web Application options
    01:43
    Defining response contracts for Swagger
    04:29
    Custom JSON binding
    01:22
    Customizing results
    03:02
    Dealing with CORS
    01:48
    Unsupported features compared to MVC
    02:44
    Why structure Minimal APIs?
    01:16
    Different ways of structuring
    03:31
    Building the structure framework
    09:56
    Separating the endpoints
    06:59
    Refactoring recap
    01:17
    Why test Minimal APIs?
    02:16
    Setting up the test project
    03:49
    The WebApplicationFactory class
    06:01
    Testing resource creation
    09:26
    The problem with created resources
    03:40
    Testing resource lookup
    02:37
    Testing resource search
    04:34
    Testing resource updating
    04:06
    Testing resource deletion
    02:25
    Creating our own WebApplicationFactory
    03:25
    Conclusion
    00:25

    Meet Your Instructor

    Nick Chapsas

    Nick Chapsas

    Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.

    He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.

    Nick creates free content on YouTube and is the host of the Keep Coding Podcast.

    View all courses by Nick Chapsas

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#