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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.