From 961044d9fa6350b0c2d90525821a62f48f7b58c1 Mon Sep 17 00:00:00 2001
From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
Date: Fri, 22 Jul 2022 13:37:28 -1000
Subject: [PATCH] Fix snippet syntax
---
.../minimal-apis/samples/todo/Program.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs b/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs
index dba48cfc2d..132fb30917 100644
--- a/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs
+++ b/aspnetcore/fundamentals/minimal-apis/samples/todo/Program.cs
@@ -17,17 +17,17 @@ if (app.Environment.IsDevelopment())
app.MapGet("/", () => "Hello World!");
-#region snippet_grp
+//
app.MapGet("/todoitems", async (TodoDb db) =>
await db.Todos.ToListAsync())
.WithTags("TodoGroup");
-#endregion
+//
-#region snippet_name
+//
app.MapGet("/todoitems2", async (TodoDb db) =>
await db.Todos.ToListAsync())
.WithName("GetToDoItems");
-#endregion
+//
app.MapGet("/todoitems/complete", async (TodoDb db) =>
await db.Todos.Where(t => t.IsComplete).ToListAsync());
@@ -38,7 +38,7 @@ app.MapGet("/todoitems/{id}", async (int id, TodoDb db) =>
? Results.Ok(todo)
: Results.NotFound());
-#region snippet_getCustom
+//
app.MapGet("/api/todoitems/{id}", async (int id, TodoDb db) =>
await db.Todos.FindAsync(id)
is Todo todo
@@ -46,7 +46,7 @@ app.MapGet("/api/todoitems/{id}", async (int id, TodoDb db) =>
: Results.NotFound())
.Produces(StatusCodes.Status200OK)
.Produces(StatusCodes.Status404NotFound);
-#endregion
+//
app.MapGet("/api/todoitems", async (TodoDb db) =>
await db.Todos.ToListAsync())