Minimal Web Api with ASP.NET Core Demo and Quick Start


A minimal web api project to showcase basic CRUD operations with Http Verb Operations (Get, Post, Put, and Delete). Swagger documentation is configured for test and verification of the web api. See quick steps and demo code to quickly create a minimal web api with core and swagger setup. This project code is the result of a Microsoft Learn tutorial to build a web API with minimal API, ASP.NET Core, and .NET.

How to Quickly Create a Minimal Web Api

Step #1 – Create a web app

dotnet new web -o PizzaStore -f net8.0

Step #2 – Add Routes to Program.cs

Just before app.Run(), and add your routes to do stuff. Here is a simple example with a pizza route:

Step #3 – Add Swagger Documentation (Program.cs)

Install the Swashbuckle package

dotnet add package Swashbuckle.AspNetCore --version 6.5.0

Configure Builder Services

Configure the app

Project Code

The project code is available on GitHub:


This project is creatively my own code and style to demo my technical expertise and contribute to the collective tech knowledge on GitHub. I have listed some of the sources where I drew some code examples and knowledge.

This code is the result of a Microsoft Learn tutorial project:Β Build a web API with minimal API, ASP.NET Core, and .NET

Kathleen has 15 yrs. of experience analyzing business IT needs and engineering solutions in payments, electric utilities, pharmaceutical, financial, virtual reality, and internet industries with a variety of technologies. Kathleen's project experience has been diverse ranging from executing the business analysis β€œdesign phase” to hands-on development, implementation, and testing of the IT solutions. Kathleen and her husband reside in Indiana with no children, instead living along with their fur babies.