Skip to content

Commit cc7a3fc

Browse files
Copilotwadepickett
andauthored
Fix missing Swagger configuration in "Register the database context" section (#36109)
* Initial plan * Fix missing Swagger code in Register database context section Co-authored-by: wadepickett <[email protected]> * Update ms.date metadata to current date per copilot instructions Co-authored-by: wadepickett <[email protected]> --------- Co-authored-by: wadepickett <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 77612c7 commit cc7a3fc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

aspnetcore/tutorials/first-web-api.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: wadepickett
44
description: Learn how to build a controller-based web API with ASP.NET Core.
55
ms.author: wpickett
66
ms.custom: mvc, engagement-fy24
7-
ms.date: 02/17/2025
7+
ms.date: 09/15/2025
88
uid: tutorials/first-web-api
99
---
1010

@@ -320,8 +320,16 @@ In ASP.NET Core, services such as the DB context must be registered with the [de
320320

321321
Update `Program.cs` with the following highlighted code:
322322

323+
# [Visual Studio](#tab/visual-studio)
324+
323325
:::code language="csharp" source="~/tutorials/first-web-api/samples/9.0/TodoApi/Program.cs" highlight="1-2,8-9":::
324326

327+
# [Visual Studio Code](#tab/visual-studio-code)
328+
329+
:::code language="csharp" source="~/tutorials/first-web-api/samples/9.0/TodoApi_SwaggerVersion/Program.cs" highlight="1-2,8-9":::
330+
331+
---
332+
325333
The preceding code:
326334

327335
* Adds `using` directives.

0 commit comments

Comments
 (0)