Skip to content

Commit dcb6239

Browse files
authored
Cross-link movie tutorial in EF Core article
1 parent 0fe9479 commit dcb6239

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
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:

0 commit comments

Comments
 (0)