From dcb62392367cb62fe7cbd4b89e4712ac4546bca2 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:37:31 -0400 Subject: [PATCH 1/2] Cross-link movie tutorial in EF Core article --- aspnetcore/blazor/blazor-ef-core.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aspnetcore/blazor/blazor-ef-core.md b/aspnetcore/blazor/blazor-ef-core.md index 931629e0f891..ff94b53f0775 100644 --- a/aspnetcore/blazor/blazor-ef-core.md +++ b/aspnetcore/blazor/blazor-ef-core.md @@ -103,6 +103,14 @@ The grid, add, and view components use the "context-per-operation" pattern, wher > [!NOTE] > Some of the code examples in this topic require namespaces and services that aren't shown. To inspect the fully working code, including the required [`@using`](xref:mvc/views/razor#using) and [`@inject`](xref:mvc/views/razor#inject) directives for Razor examples, see the [sample app](#sample-app). +:::moniker range=">= aspnetcore-8.0" + +## Build a Blazor movie database app tutorial + +For a tutorial experience building an app that uses EF Core to work with a database, see . The tutorial shows you how to create a Blazor Web App that can display and manage movies in a movie database. + +:::moniker-end + ## Database access EF Core relies on a as the means to [configure database access](/ef/core/miscellaneous/configuring-dbcontext) and act as a [*unit of work*](https://martinfowler.com/eaaCatalog/unitOfWork.html). EF Core provides the extension for ASP.NET Core apps that registers the context as a *scoped* service. In server-side Blazor apps, scoped service registrations can be problematic because the instance is shared across components within the user's circuit. isn't thread safe and isn't designed for concurrent use. The existing lifetimes are inappropriate for these reasons: From e217477f13ec8672df9e8bd22de167d410e6804d Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:42:42 -0400 Subject: [PATCH 2/2] Update toc.yml --- aspnetcore/toc.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/aspnetcore/toc.yml b/aspnetcore/toc.yml index 36f7fe097d5f..85ed4eb7d7f7 100644 --- a/aspnetcore/toc.yml +++ b/aspnetcore/toc.yml @@ -415,7 +415,25 @@ items: - name: Build a Blazor todo list app uid: blazor/tutorials/build-a-blazor-app - name: Build a Blazor movie database app - uid: blazor/tutorials/movie-database-app/index + items: + - name: Overview + uid: blazor/tutorials/movie-database-app/index + - name: Create a Blazor Web App + uid: blazor/tutorials/movie-database-app/part-1 + - name: Add and scaffold a model + uid: blazor/tutorials/movie-database-app/part-2 + - name: Learn about Razor components + uid: blazor/tutorials/movie-database-app/part-3 + - name: Work with a database + uid: blazor/tutorials/movie-database-app/part-4 + - name: Add validation + uid: blazor/tutorials/movie-database-app/part-5 + - name: Add search + uid: blazor/tutorials/movie-database-app/part-6 + - name: Add a new field + uid: blazor/tutorials/movie-database-app/part-7 + - name: Add interactivity + uid: blazor/tutorials/movie-database-app/part-8 - name: SignalR with Blazor uid: blazor/tutorials/signalr-blazor - name: Learn modules