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

928 B

title author description manager ms.author ms.date ms.prod ms.technology ms.topic uid
Adding a controller rick-anderson How to add a controller to a simple ASP.NET Core MVC app wpickett riande 02/28/2017 asp.net-core aspnet get-started-article 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