In addition, you can read about how .NET 6 Minimal APIs has evolved ASP.NET Core.
- Home
- .NET code examples
- .NET 6 Minimal APIs sample using ASP.NET Core
.NET 6 Minimal APIs sample using ASP.NET Core
Download a sample of using .NET 6 Minimal APIs.
- Adding the web application's configuration into the
Programclass. - Removing the namespace, class and
Mainmethod from theProgramclass. - Using Minimal APIs.
Software
This is the software that will need to be installed onto your machine.
- Visual Studio 2022 Preview 6 or above. It will work with the free community version.
- .NET 6.0 SDK RC 2 or above. Visual Studio 2022 should already have the .NET SDK installed.
Get the application working
These are the steps to get the application working.
- Fill out the code example form. We will send you an email where you can download the source code.
You are now ready to go.
Open the project in Visual Studio
Open up RoundTheCode.FrontEndPostApi.sln in Visual Studio 2022.
https://localhost:8001, and you can test out the API endpoints that are being used with Minimal APIs.
More information
Watch our video where we go ahead and convert this ASP.NET Core application from .NET Core 2.1 to .NET 6.
Give us your anonymous feedback regarding this page, or any other areas of the website.
Watch .NET tutorials
Subscribe to our YouTube channel
Related code examples