mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
41 lines
948 B
Plaintext
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>
|