You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
@page
|
|
|
@model ContosoPizza.Pages.PizzaListModel
|
|
|
@{
|
|
|
ViewData["Title"] = "Pizza List 🍕";
|
|
|
}
|
|
|
|
|
|
<h1>Pizza List 🍕</h1>
|
|
|
|
|
|
<table class="table mt-5">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th scope="col">Name</th>
|
|
|
<th scope="col">Price</th>
|
|
|
<th scope="col">Size</th>
|
|
|
<th scope="col">Gluten Free</th>
|
|
|
<th scope="col">Delete</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
@foreach (var pizza in Model.PizzaList)
|
|
|
{
|
|
|
<tr>
|
|
|
<td>@pizza.Name</td>
|
|
|
<td>@($"{pizza.Price:C}")</td>
|
|
|
<td>@pizza.Size</td>
|
|
|
<td>@(pizza.IsGlutenFree ? "✔️" : string.Empty)</td>
|
|
|
<td>
|
|
|
<form method="post" asp-asp-page-handler="Delete" asp-route-id="@pizza.Id">
|
|
|
<button class="btn btn-danger">Delete</button>
|
|
|
</form>
|
|
|
</td>
|
|
|
</tr>
|
|
|
}
|
|
|
</tbody>
|
|
|
</table> |