Home > MVC > Create web API with ASP.NET Core in Visual Studio Code



Create web API with ASP.NET Core in Visual Studio Code

In this article, we will explain create web API with ASP.NET Core in Visual Studio Code with an example.


In this article, we will explain create web API with ASP.NET Core in Visual Studio Code with an example code Visual Studio Code is a lightweight but powerful source code editor. It is a fully open-source and cross-platform framework available on Windows, Linux and Mac.

 

We can download Visual Studio code Click here for your platform (Windows, macOS or Linux).

 

Step -1

Open Visual Studio Code.

Create Web API with ASP.NET Core in Visual Studio Code.

 

Step -2

Click on the file in the menu and select Open Folder. We are creating a folder for project(WEBAPI_ASP.NET_CORE) and select created folder name.

Create Web API with ASP.NET Core in Visual Studio Code.

 

Step -3

Go to Terminal and Select New Terminal in the menu. In the terminal window, type dotnet new webapi .

Create Web API with ASP.NET Core in Visual Studio Code.

 

Step -4

Run the MVC Application. In the terminal window, type dotnet run .

Create Web API with ASP.NET Core in Visual Studio Code.

 

Controllers

 

Output

Create Web API with ASP.NET Core in Visual Studio Code

 

Download




Note: All contents are copyright of their authors.



Comments



Leave a Reply

Comment:*
Email ID:*


Name:*