From 1254ceb9b2862d7284de7e9bafe0d0095fbea440 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 15 Nov 2024 07:32:10 -0500 Subject: [PATCH] Blazor movie dB tutorial updates (#34136) --- aspnetcore/blazor/tutorials/movie-database-app/part-3.md | 7 ++++--- aspnetcore/blazor/tutorials/movie-database-app/part-6.md | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aspnetcore/blazor/tutorials/movie-database-app/part-3.md b/aspnetcore/blazor/tutorials/movie-database-app/part-3.md index d3caa7123d..163a7166d5 100644 --- a/aspnetcore/blazor/tutorials/movie-database-app/part-3.md +++ b/aspnetcore/blazor/tutorials/movie-database-app/part-3.md @@ -229,7 +229,7 @@ The `@page` directive's route template indicates the URL for the page is `/movie * `BlazorWebAppMovies.Models` * `BlazorWebAppMovies.Data` -The database context factory (`IDbContextFactory`) is injected into the component with the `@inject` directive. The factory approach requires that a database context be disposed, so the component implements the interface with the `@implements` directive. +The database context factory (`IDbContextFactory`, where the type (`T`) is a `BlazorWebAppMoviesContext`) is injected into the component with the `@inject` directive. The factory approach requires that a database context be disposed, so the component implements the interface with the `@implements` directive. The page title is set via the Blazor framework's component, and an H1 section heading is the first rendered element: @@ -316,8 +316,9 @@ For the movie example from the last part of the tutorial series, *The Matrix*&co The column names are taken from the `Movie` model properties, so the release date doesn't have a space between the words. Add a to the with a value that includes a space between the words: -```razor - +```diff +- ++ ``` Run the app to see that the column displays two words for the release date. diff --git a/aspnetcore/blazor/tutorials/movie-database-app/part-6.md b/aspnetcore/blazor/tutorials/movie-database-app/part-6.md index 1b9bb7cc88..c48a71e5c1 100644 --- a/aspnetcore/blazor/tutorials/movie-database-app/part-6.md +++ b/aspnetcore/blazor/tutorials/movie-database-app/part-6.md @@ -71,12 +71,12 @@ Append a query string to the URL in the address bar: `?titleFilter=road+warrior` Next, give users a way to provide the `titleFilter` filter string via the component's UI. Add the following HTML under the H1 heading (`

Index

`). The following HTML reloads the page with the contents of the textbox as a query string value: ```html -

+

-

+
``` The `data-enhance` attribute applies *enhanced navigation* to the component, where Blazor intercepts the GET request and performs a fetch request instead. Blazor then patches the response content into the page, which avoids a full-page reload and preserves more of the page state. The page loads faster, usually without losing the user's scroll position.