Skip to content

Commit 4684ef6

Browse files
guardrexCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 73de737 commit 4684ef6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aspnetcore/blazor/tutorials/movie-database-app/part-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ The `movie` variable is a private field of type `Movie`, which is a null-referen
421421

422422
The `Id` is a *component parameter* supplied from the component's query string due to the presence of the [`[SupplyParameterFromQuery]` attribute](xref:Microsoft.AspNetCore.Components.SupplyParameterFromQueryAttribute). If the identifier is missing, `Id` defaults to zero (`0`).
423423

424-
`OnInitializedAsync` is the first component lifecycle method that we've seen. This method is executed when the component loads. <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync%2A> is called on the database set (`DbSet<Movie>`) to retrieve the movie entity with and `Id` equal to the `Id` parameter that was set by the query string. If `movie` is `null`, <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A?displayProperty=nameWithType> is used to navigate to a `notfound` endpoint.
424+
`OnInitializedAsync` is the first component lifecycle method that we've seen. This method is executed when the component loads. <xref:Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync%2A> is called on the database set (`DbSet<Movie>`) to retrieve the movie entity with an `Id` equal to the `Id` parameter that was set by the query string. If `movie` is `null`, <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A?displayProperty=nameWithType> is used to navigate to a `notfound` endpoint.
425425

426426
<!-- UPDATE 10.0 - Update for scaffolder changes when they
427427
appear: https://github.com/dotnet/Scaffolding/issues/3177 -->

aspnetcore/blazor/tutorials/movie-database-app/part-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private async Task UpdateMovie()
302302
{
303303
if (!MovieExists(Movie!.Id))
304304
{
305-
NavigationManager.NotFound;
305+
NavigationManager.NotFound();
306306
}
307307
else
308308
{

0 commit comments

Comments
 (0)