cs11dotnet7/vscode/PracticalApps/Northwind.Mvc/Views/Home/Customers.cshtml
2022-03-13 16:17:01 +00:00

41 lines
948 B
Plaintext

@using Packt.Shared
@model IEnumerable<Customer>
<h2>@ViewData["Title"]</h2>
<table class="table">
<thead>
<tr>
<th>Company Name</th>
<th>Contact Name</th>
<th>Address</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
@if (Model is not null)
{
@foreach (Customer c in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => c.CompanyName)
</td>
<td>
@Html.DisplayFor(modelItem => c.ContactName)
</td>
<td>
@Html.DisplayFor(modelItem => c.Address)
@Html.DisplayFor(modelItem => c.City)
@Html.DisplayFor(modelItem => c.Region)
@Html.DisplayFor(modelItem => c.Country)
@Html.DisplayFor(modelItem => c.PostalCode)
</td>
<td>
@Html.DisplayFor(modelItem => c.Phone)
</td>
</tr>
}
}
</tbody>
</table>