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

1.1 KiB

title author description keywords ms.author manager ms.date ms.topic ms.assetid ms.technology ms.prod uid
Adding a controller to an ASP.NET Core MVC app rick-anderson How to add a controller to a basic ASP.NET Core MVC app using Visual Studio of Mac ASP.NET Core,MVC,controller riande wpickett 06/28/2017 article e04b6666-d0de-4d99-b78f-d6a0c4634a87 aspnet asp.net-core tutorials/first-mvc-app-mac/adding-controller

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

By Rick Anderson

[!INCLUDEadding-controller]

Add a controller

In Solution Explorer, right-click Controllers > Add > New File.

Contextual menu

Select ASP.NET Core and MVC Controller Class.

Name the controller HelloWorldController.

Add MVC controller and name it

[!INCLUDEadding-controller2]

[!div class="step-by-step"] Previous Next