Skip to content

Commit 5a02d01

Browse files
authored
Cross-link movie tutorial in EF Core article (#33889)
1 parent 0fe9479 commit 5a02d01

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

aspnetcore/blazor/blazor-ef-core.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ The grid, add, and view components use the "context-per-operation" pattern, wher
103103
> [!NOTE]
104104
> 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).
105105
106+
:::moniker range=">= aspnetcore-8.0"
107+
108+
## Build a Blazor movie database app tutorial
109+
110+
For a tutorial experience building an app that uses EF Core to work with a database, see <xref:blazor/tutorials/movie-database-app/index>. The tutorial shows you how to create a Blazor Web App that can display and manage movies in a movie database.
111+
112+
:::moniker-end
113+
106114
## Database access
107115

108116
EF Core relies on a <xref:Microsoft.EntityFrameworkCore.DbContext> 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 <xref:Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.AddDbContext%2A> 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. <xref:Microsoft.EntityFrameworkCore.DbContext> isn't thread safe and isn't designed for concurrent use. The existing lifetimes are inappropriate for these reasons:

aspnetcore/toc.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,25 @@ items:
415415
- name: Build a Blazor todo list app
416416
uid: blazor/tutorials/build-a-blazor-app
417417
- name: Build a Blazor movie database app
418-
uid: blazor/tutorials/movie-database-app/index
418+
items:
419+
- name: Overview
420+
uid: blazor/tutorials/movie-database-app/index
421+
- name: Create a Blazor Web App
422+
uid: blazor/tutorials/movie-database-app/part-1
423+
- name: Add and scaffold a model
424+
uid: blazor/tutorials/movie-database-app/part-2
425+
- name: Learn about Razor components
426+
uid: blazor/tutorials/movie-database-app/part-3
427+
- name: Work with a database
428+
uid: blazor/tutorials/movie-database-app/part-4
429+
- name: Add validation
430+
uid: blazor/tutorials/movie-database-app/part-5
431+
- name: Add search
432+
uid: blazor/tutorials/movie-database-app/part-6
433+
- name: Add a new field
434+
uid: blazor/tutorials/movie-database-app/part-7
435+
- name: Add interactivity
436+
uid: blazor/tutorials/movie-database-app/part-8
419437
- name: SignalR with Blazor
420438
uid: blazor/tutorials/signalr-blazor
421439
- name: Learn modules

0 commit comments

Comments
 (0)