Create a minimal API with ASP.NET Core – Part 1
1 min read

Create a minimal API with ASP.NET Core – Part 1

Let´s go through this tutorial and create a minimal API that doesn´t use controllers.

First check that you have vscode, .net sdk and C# for vscode. Check your sdk version by typing dotnet –info.

dotnet --info

Create a new .net core web project and open the folder in vscode.

dotnet new web -o TodoApi
cd TodoApi
code -r ../TodoApi

This asp.net web app serves http pages and creates a HTTP GET endpoint that returns hello world!

Type in the console to trust the HTTPS development.

dotnet dev-certs https --trust

Run the dotnet app with

dotnet run

Next run the command to invoke a webrequest on the port the dotnet app is listening to.

invoke-webrequest http://localhost:5080

Great work! In the next post we´ll work with our entityframework.