Update page.md (#13888)
parent
5f0fd7a372
commit
1b89c7c86e
|
@ -23,7 +23,7 @@ Examine the *Pages/Movies/Index.cshtml.cs* Page Model:
|
|||
|
||||
[!code-csharp[](razor-pages-start/snapshot_sample3/RazorPagesMovie30/Pages/Movies/Index.cshtml.cs)]
|
||||
|
||||
Razor Pages are derived from `PageModel`. By convention, the `PageModel`-derived class is called `<PageName>Model`. The constructor uses [dependency injection](xref:fundamentals/dependency-injection) to add the `RazorPagesMovieContext` to the page. All the scaffolded pages follow this pattern. See [Asynchronous code](xref:data/ef-rp/intro#asynchronous-code) for more information on asynchronous programing with Entity Framework.
|
||||
Razor Pages are derived from `PageModel`. By convention, the `PageModel`-derived class is called `<PageName>Model`. The constructor uses [dependency injection](xref:fundamentals/dependency-injection) to add the `RazorPagesMovieContext` to the page. All the scaffolded pages follow this pattern. See [Asynchronous code](xref:data/ef-rp/intro#asynchronous-code) for more information on asynchronous programming with Entity Framework.
|
||||
|
||||
When a request is made for the page, the `OnGetAsync` method returns a list of movies to the Razor Page. `OnGetAsync` or `OnGet` is called on a Razor Page to initialize the state for the page. In this case, `OnGetAsync` gets a list of movies and displays them.
|
||||
|
||||
|
@ -368,4 +368,4 @@ The [Input Tag Helper](xref:mvc/views/working-with-forms) (`<input asp-for="Movi
|
|||
> [Previous: Adding a model](xref:tutorials/razor-pages/model)
|
||||
> [Next: Database](xref:tutorials/razor-pages/sql)
|
||||
|
||||
::: moniker-end
|
||||
::: moniker-end
|
||||
|
|
Loading…
Reference in New Issue