- Home
- .NET code examples
- Migrate controllers to Minimal APIs using API versioning
Migrate controllers to Minimal APIs using API versioning
Download the code that shows how to migrate controllers to Minimal API endpoints using API versioning in an ASP.NET Core Web API.
You can learn more about how to migrate from controllers to Minimal APIs, or watch the video.
Download the code example
You'll need to fill out the code example form. We will send you an email where you can download the code example.
Software
This is the software that will need to be installed onto your machine.
Visual Studio 2026. Version 18.0.0 or above. It will work with the free community version.
.NET 10 SDK. Version 10.0.0 or above.
The application
Open up RoundTheCode.MigrateToMinApis.slnx, and run the application. The Swagger documentation will load at https://localhost:7156/swagger.
You can switch definitions in the top-right hand corner of the Swagger documentation.V1 shows the controller endpoints, and V2 shows the same endpoints using Minimal APIs.
Related code examples