Creating the view

When we start our application, we want to see a list of work items. Therefore, we need to create a view for HomeController to display a list of work items by performing the following steps:

  1. In the Views folder, expand the Home subfolder and delete the Index.cshtml file if there is one.
  2. Then, right-click the Home folder and navigate to Add | View from the context menu. The Add MVC View window will be displayed.
  3. Name the view as Index and select List as the Template. From the dropdown for Model class, select WorkItem (BugTracker.Models).
  4. Leave the rest of the settings as they are and click on the Add button:

After the view ...

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.