Skip to content

Commit 148c87d

Browse files
Upgrade tutorial to .NET 9.0 and Aspire 9.4.0 (#4195)
* Small corrections for .NET 9.0 and Aspire 9.4.0 * Fixed code highlighting.
1 parent a1f0544 commit 148c87d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/database/ef-core-migrations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ If you prefer using Visual Studio's Package Manager Console instead of the comma
8484
8585
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:
8686
87-
:::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.Data/Models/SupportTicket.cs" range="4-15" highlight="10" :::
87+
:::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.Data/Models/SupportTicket.cs" range="5-13" highlight="8" :::
8888
8989
1. Create another new migration to capture the changes to the model:
9090
@@ -164,10 +164,10 @@ To execute migrations, call the EF Core <xref:Microsoft.EntityFrameworkCore.Migr
164164
165165
To create a service that applies the migrations:
166166
167-
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 8.0**. If using the command line, use the following commands from the solution directory:
167+
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:
168168
169169
```dotnetcli
170-
dotnet new worker -n SupportTicketApi.MigrationService -f "net8.0"
170+
dotnet new worker -n SupportTicketApi.MigrationService -f "net9.0"
171171
dotnet sln add SupportTicketApi.MigrationService
172172
```
173173
@@ -190,7 +190,7 @@ To create a service that applies the migrations:
190190
191191
1. Add the highlighted lines to the *:::no-loc text="Program.cs":::* file in the *:::no-loc text="SupportTicketApi.MigrationService":::* project:
192192
193-
:::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.MigrationService/Program.cs" highlight="1,7,9-11" :::
193+
:::code source="~/aspire-docs-samples-solution/SupportTicketApi/SupportTicketApi.MigrationService/Program.cs" highlight="1,6-7,9-12" :::
194194
195195
In the preceding code:
196196

0 commit comments

Comments
 (0)