1
0
mirror of https://github.com/rudollee/LearningMVC.git synced 2025-06-07 07:56:14 +00:00
LearningMVC/Razor/Views/Home/DemoArray.cshtml
2017-04-03 23:33:58 +09:00

23 lines
324 B
Plaintext

@using Razor.Models
@model Razor.Models.Product[]
@{
ViewBag.Title = "DemoArray";
}
@if (Model.Length > 0)
{
<table>
<thead><tr><th>Product</th><th>Price</th></tr></thead>
<tbody>
@foreach (Product p in Model)
{
<tr>
<td>@p.Name</td>
<td>@p.Price</td>
</tr>
}
</tbody>
</table>
}