AspNetCore.Docs/aspnetcore/tutorials/first-mvc-app-xplat/adding-controller.md

929 B

title author description ms.author manager ms.date ms.topic ms.technology ms.prod uid
Adding a controller rick-anderson How to add a controller to a simple ASP.NET Core MVC app riande wpickett 02/28/2017 get-started-article aspnet asp.net-core tutorials/first-mvc-app-xplat/adding-controller

Adding a controller to an ASP.NET Core MVC app with Visual Studio Code

By Rick Anderson

[!INCLUDEadding-controller]

  • In VS Code, select the EXPLORER icon and then control-click (right-click) Controllers > New File and name the new file HelloWorldController.cs.

Contextual menu

[!INCLUDEadding-controller2]

[!div class="step-by-step"] Previous - Add a controller Next - Add a view