diff --git a/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs b/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs index b5297638ec..dba48cfc2d 100644 --- a/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs +++ b/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs @@ -44,8 +44,8 @@ app.MapGet("/api/todoitems/{id}", async (int id, TodoDb db) => is Todo todo ? Results.Ok(todo) : Results.NotFound()) - .Produces(200) - .Produces(404); + .Produces(StatusCodes.Status200OK) + .Produces(StatusCodes.Status404NotFound); #endregion app.MapGet("/api/todoitems", async (TodoDb db) =>