Skip to content

Commit ebb546b

Browse files
authored
Cross-link sample app code (#20151)
1 parent 6d22c8d commit ebb546b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

aspnetcore/blazor/blazor-server-ef-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The fastest way to create a new <xref:Microsoft.EntityFrameworkCore.DbContext> i
8383

8484
The recommended solution to create a new <xref:Microsoft.EntityFrameworkCore.DbContext> with dependencies is to use a factory. EF Core 5.0 or later provides a built-in factory for creating new contexts.
8585

86-
The following example configures [SQLite](https://www.sqlite.org/index.html) and enables data logging. The code uses an extension method to configure the database factory for DI and provide default options:
86+
The following example configures [SQLite](https://www.sqlite.org/index.html) and enables data logging. The code uses an [extension method (`AddDbContextFactory`)](https://github.com/dotnet/AspNetCore.Docs/blob/master/aspnetcore/blazor/common/samples/3.x/BlazorServerEFCoreSample/BlazorServerDbContextExample/Data/FactoryExtensions.cs) to configure the database factory for DI and provide default options:
8787

8888
[!code-csharp[](./common/samples/5.x/BlazorServerEFCoreSample/BlazorServerDbContextExample/Startup.cs?name=snippet1)]
8989

0 commit comments

Comments
 (0)