Skip to content

Commit 0097385

Browse files
authored
Add instructions for running the sample app locally (#36952)
1 parent f5d9bde commit 0097385

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • aspnetcore/blazor/tutorials/movie-database-app

aspnetcore/blazor/tutorials/movie-database-app/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ For Microsoft Azure services, we recommend using *managed identities*. Managed i
4545

4646
If you don't intend to create the demonstration app while reading the article, you can refer to the completed sample app in the [Blazor samples GitHub repository (`dotnet/blazor-samples`)](https://github.com/dotnet/blazor-samples). Select the latest version folder in the repository. The sample folder for this tutorial's project is named `BlazorWebAppMovies`.
4747

48+
To run the sample locally, apply the pending migrations, which include a migration to create the database. Use the following instructions:
49+
50+
If the [`dotnet-ef` tool](/ef/core/miscellaneous/cli/dotnet) isn't installed, install the tool with the following command from either a command shell, the Developer PowerShell command shell in Visual Studio, or the **Terminal** PowerShell command shell in VS Code:
51+
52+
```dotnetcli
53+
dotnet tool install --global dotnet-ef
54+
```
55+
56+
From a command shell opened to the project's root folder (the project directory containing the `BlazorWebAppMovies.csproj` file), execute the following command:
57+
58+
```dotnetcli
59+
dotnet ef database update
60+
```
61+
62+
After executing the preceding command, run the sample using any of the following approaches:
63+
64+
* Visual Studio
65+
* Select the **Run** button.
66+
* Use **Debug** > **Start Debugging** from the menu.
67+
* Press <kbd>F5</kbd>.
68+
* .NET CLI command shell: Execute the `dotnet watch` (or `dotnet run`) command from the project's root folder.
69+
4870
## Article code examples
4971

5072
The line breaks of code examples shown in the ASP.NET Core documentation often don't match line breaks in scaffolded code generated by tooling for an app. This is due to an article publishing limitation. Lines of code in articles are generally limited to 85 characters in length, and we manually adjust the line length using line breaks to satisfy our publishing guidelines.

0 commit comments

Comments
 (0)