.Net Core Web API from scratch with Visual Studio Code
Hi all, In this blog I'll explain you how to build and test .Net Core Web API. I assume you have installed Visual Studio Code and C# extension which comes to that IDE. So, Lets get started. 1. Create a folder, I'll name it as CoreWebApi. 2. Open this folder in VS Code. 3. Open its' terminal by pressing Ctrl + ~ 4. Create folder called API and go to that folder in terminal. 5. Type 'dotnet new web' and hit Enter. And you should get the following message: The template "ASP.NET Core Empty" was created successfully. This template contains technologies from parties other than Microsoft, see https://aka.ms/template-3pn for details. 6. Go to Startup.cs and add services.AddMvc(); to ConfigureServices(IServiceCollection services) method. So that method should like as bellow: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } 7. Comment app.Run section in Configure method and add app.UseMvcWithDefau...