Skip to content

Commit d532b83

Browse files
committed
update WebApi to .NET 9 (without swagger)
1 parent 3c483c5 commit d532b83

File tree

16 files changed

+442
-72
lines changed

16 files changed

+442
-72
lines changed

aspnetcore/tutorials/first-web-api.md

Lines changed: 394 additions & 61 deletions
Large diffs are not rendered by default.
144 KB
Loading
20.7 KB
Loading
44 KB
Loading
80.6 KB
Loading
68 KB
Loading
62.2 KB
Loading
66 KB
Loading
74.8 KB
Loading

aspnetcore/tutorials/first-web-api/samples/9.0/TodoApi/Controllers/TodoItemsController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
namespace TodoApi.Controllers;
66

7+
// <snippet_Route>
78
[Route("api/[controller]")]
89
[ApiController]
910
public class TodoItemsController : ControllerBase
11+
// </snippet_Route>
1012
{
1113
private readonly TodoContext _context;
1214

@@ -86,6 +88,7 @@ public async Task<ActionResult<TodoItem>> PostTodoItem(TodoItem todoItem)
8688
// </snippet_Create>
8789

8890
// DELETE: api/TodoItems/5
91+
// <snippet_Delete>
8992
[HttpDelete("{id}")]
9093
public async Task<IActionResult> DeleteTodoItem(long id)
9194
{
@@ -100,6 +103,7 @@ public async Task<IActionResult> DeleteTodoItem(long id)
100103

101104
return NoContent();
102105
}
106+
// </snippet_Delete>
103107

104108
private bool TodoItemExists(long id)
105109
{

0 commit comments

Comments
 (0)