Commit 63f9d8b4 authored by TTrueBenji's avatar TTrueBenji

Добавил удаление посредством селекта.

parent 757c2b89
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
} }
<a asp-action="Create" asp-controller="Phones">Добавить устройство</a> <a asp-action="Create" asp-controller="Phones">Добавить устройство</a>
@* https://localhost:5001/Phone/Create method GET*@
@if (Model.Count == 0) @if (Model.Count == 0)
{ {
<h2>Список пуст.</h2> <h2>Список пуст.</h2>
...@@ -57,5 +56,15 @@ else ...@@ -57,5 +56,15 @@ else
</tr> </tr>
} }
</table> </table>
<form asp-action="Delete" asp-controller="Phones" method="get">
<select name="phoneId" id="">
@foreach (var phone in Model)
{
<option value="@phone.Id">@phone.Name</option>
}
</select>
<button type="submit">delete</button>
</form>
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment