Skip to content

Commit 0f7e06b

Browse files
committed
renamed Delete to DeleteItem (action didn't work for Delete for some reason)
1 parent 49476ae commit 0f7e06b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

4-WebApp-your-API/4-1-MyOrg/Client/Controllers/TodoListController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public async Task<ActionResult> Edit(int id, [Bind("Id,Title,Owner")] Todo todo)
6767
}
6868

6969
// GET: TodoList/Delete/5
70-
public async Task<ActionResult> Delete(int id)
70+
public async Task<ActionResult> DeleteItem(int id)
7171
{
7272
Todo todo = await this._todoListService.GetAsync(id);
7373

@@ -82,7 +82,7 @@ public async Task<ActionResult> Delete(int id)
8282
// POST: TodoList/Delete/5
8383
[HttpPost]
8484
[ValidateAntiForgeryToken]
85-
public async Task<ActionResult> Delete(int id, [Bind("Id,Title,Owner")] Todo todo)
85+
public async Task<ActionResult> DeleteItem(int id, [Bind("Id,Title,Owner")] Todo todo)
8686
{
8787
await _todoListService.DeleteAsync(id);
8888
return RedirectToAction("Index");

4-WebApp-your-API/4-1-MyOrg/Client/TodoListClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.1" />
22-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.1" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.2" />
22+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.2" />
2323
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
2424
</ItemGroup>
2525

4-WebApp-your-API/4-1-MyOrg/Client/Views/TodoList/Delete.cshtml renamed to 4-WebApp-your-API/4-1-MyOrg/Client/Views/TodoList/DeleteItem.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</dd>
2626
</dl>
2727

28-
<form asp-action="Delete">
28+
<form asp-action="DeleteItem">
2929
<input type="hidden" asp-for="Id" />
3030
<input type="submit" value="Delete" class="btn btn-danger" /> |
3131
<a asp-action="Index">Back to List</a>

4-WebApp-your-API/4-1-MyOrg/Client/Views/TodoList/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<td>
4242
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
4343
@Html.ActionLink("Details", "Details", new { id = item.Id }) |
44-
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
44+
@Html.ActionLink("Delete", "DeleteItem", new { id = item.Id })
4545
</td>
4646
</tr>
4747
}

4-WebApp-your-API/4-1-MyOrg/TodoListService/TodoListService.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.1" />
10+
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.2" />
1111
</ItemGroup>
1212

1313
</Project>

0 commit comments

Comments
 (0)