Minor fixes and clarifications (#23177)
* Update razor-pages-start.md * Update model.md * Update model.md * Update sql.md * Update model.md * Update model.md * Update model.mdpull/23198/head
parent
e596cce731
commit
1ed9843189
|
@ -784,6 +784,8 @@ In this section, the movie model is scaffolded. That is, the scaffolding tool pr
|
|||
1. Select **Add**.
|
||||
|
||||
![Add Razor Pages](model/_static/3/arp.png)
|
||||
|
||||
If you get an error message that says you need to install the `Microsoft.EntityFrameworkCore.SqlServer` package, repeat the steps starting with **Add** > **New Scaffolded Item**.
|
||||
|
||||
The *appsettings.json* file is updated with the connection string used to connect to a local database.
|
||||
|
||||
|
@ -968,7 +970,7 @@ An alternative approach is to disable the CS8618 [warning with pragma](/dotnet/f
|
|||
|
||||
[!code-csharp[](~/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/Data/RazorPagesMovieContext.cs?name=snippet_prag)]
|
||||
|
||||
For the warnings in the Razor Pages C# code behind files, use the [pragma](/dotnet/csharp/language-reference/preprocessor-directives#pragmas) C# preprocessor directive is disable warnings. For example, use the following highlighted code in the *Pages/Movies/Index.cshtml.cs* file:
|
||||
For the warnings in the Razor Pages C# code behind files, use the [pragma](/dotnet/csharp/language-reference/preprocessor-directives#pragmas) C# preprocessor directive to disable warnings. For example, use the following highlighted code in the *Pages/Movies/Index.cshtml.cs* file:
|
||||
|
||||
[!code-csharp[](~/tutorials/razor-pages/razor-pages-start/snapshot_sample6/Pages/Movies/Index.cshtml.cs?name=snippet&highlight=3-4,21,22)]
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ We hope to have Visual Studio for Mac instructions soon.
|
|||
|
||||
<!-- replace all of this with updated includes -->
|
||||
|
||||
Press Ctrl+F5 to run without the debugger.
|
||||
Select **RazorPagesMovie** in **Solution Explorer**, and then press Ctrl+F5 to run without the debugger.
|
||||
|
||||
Visual Studio displays the following dialog when a project is not yet configured to use SSL:
|
||||
|
||||
|
@ -505,8 +505,7 @@ The following code enables various [Middleware](xref:fundamentals/middleware/ind
|
|||
* `app.UseRouting();` : Adds route matching to the middleware pipeline. For more information, see <xref:fundamentals/routing>
|
||||
* `app.MapRazorPages();`: Configures endpoint routing for Razor Pages.
|
||||
* `app.UseAuthorization();` : Authorizes a user to access secure resources. This app doesn't use authorization, therefore this line could be removed.
|
||||
|
||||
`app.Run();` : runs the app.
|
||||
* `app.Run();` : Runs the app.
|
||||
|
||||
## Troubleshooting with the completed sample
|
||||
|
||||
|
|
|
@ -427,6 +427,12 @@ Update the *Program.cs* with the following highlighted code:
|
|||
|
||||
[!code-csharp[](~/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs?name=snippet_all&highlight=14-19)]
|
||||
|
||||
Add a `using` directive to the top of the file:
|
||||
|
||||
```csharp
|
||||
using RazorPagesMovie.Models;
|
||||
```
|
||||
|
||||
# [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac)
|
||||
|
||||
[!code-csharp[](~/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie60/ProgramSeed.cs?name=snippet_all_sl&highlight=14-19)]
|
||||
|
|
Loading…
Reference in New Issue