Adding the controllers

We now need to start adding our controllers. Controllers are responsible for responding to requests made to your application:

  1. To the Controllers folder, add another controller called TwitterController. This controller will be responsible for composing a new tweet and for publishing a new tweet. We will get back to this controller later on. For now, just create the class. After you have added it, your solution should look as follows:
  1. By default, Visual Studio has HomeController added for you when you created your ASP.NET Core MVC application. Open HomeController and look at the contents of the class. Be sure to add ...

Get C# 7 and .NET Core 2.0 Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.