From cada5b2912f9199a66b6180b00392f04156758d7 Mon Sep 17 00:00:00 2001 From: AJ Matthews Date: Tue, 5 Aug 2025 16:29:35 +0100 Subject: [PATCH 1/2] Small corrections for .NET 9.0 and Aspire 9.4.0 --- docs/database/ef-core-migrations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/database/ef-core-migrations.md b/docs/database/ef-core-migrations.md index 6a8b54a2bf..059b949a8d 100644 --- a/docs/database/ef-core-migrations.md +++ b/docs/database/ef-core-migrations.md @@ -164,10 +164,10 @@ To execute migrations, call the EF Core **:::no-loc text="New Project":::**. Select **:::no-loc text="Worker Service":::**, name the project *:::no-loc text="SupportTicketApi.MigrationService":::* and target **.NET 8.0**. If using the command line, use the following commands from the solution directory: +1. Add a new Worker Service project to the solution. If using Visual Studio, right-click the solution in Solution Explorer and select **:::no-loc text="Add":::** > **:::no-loc text="New Project":::**. Select **:::no-loc text="Worker Service":::**, name the project *:::no-loc text="SupportTicketApi.MigrationService":::* and target **.NET 9.0**. If using the command line, use the following commands from the solution directory: ```dotnetcli - dotnet new worker -n SupportTicketApi.MigrationService -f "net8.0" + dotnet new worker -n SupportTicketApi.MigrationService -f "net9.0" dotnet sln add SupportTicketApi.MigrationService ``` @@ -190,7 +190,7 @@ To create a service that applies the migrations: 1. Add the highlighted lines to the *:::no-loc text="Program.cs":::* file in the *:::no-loc text="SupportTicketApi.MigrationService":::* project: - :::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.MigrationService/Program.cs" highlight="1,7,9-11" ::: + :::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.MigrationService/Program.cs" highlight="1,6-7,9-12" ::: In the preceding code: From 3aa126ba5b243ad3b975bb75d84dce092e66d2e4 Mon Sep 17 00:00:00 2001 From: AJ Matthews Date: Thu, 7 Aug 2025 17:32:11 +0100 Subject: [PATCH 2/2] Fixed code highlighting. --- docs/database/ef-core-migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/database/ef-core-migrations.md b/docs/database/ef-core-migrations.md index 059b949a8d..e7a1c8822c 100644 --- a/docs/database/ef-core-migrations.md +++ b/docs/database/ef-core-migrations.md @@ -84,7 +84,7 @@ If you prefer using Visual Studio's Package Manager Console instead of the comma 1. Modify the model so that it includes a new property. Open *:::no-loc text="SupportTicketApi.Data\\Models\\SupportTicket.cs":::* and add a new property to the `SupportTicket` class: - :::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.Data/Models/SupportTicket.cs" range="4-15" highlight="10" ::: + :::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.Data/Models/SupportTicket.cs" range="5-13" highlight="8" ::: 1. Create another new migration to capture the changes to the model: