@model IEnumerable<User>
@{
ViewData["Title"] = "Users";
}
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
name*
number of associated accounts
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
@Html.DisplayFor(modelItem => item.DisplayName)
@Html.DisplayFor(modelItem => item.Accounts.Count)x
<a asp-action="Details" asp-route-id="@item.Id">Details</a>
</tbody>
</table>