I see that there's a lot of confusion on how the new Blazor SSR and the interactive server render mode works under the hood. People are tempted to use the EF Core DbContext in interactive server components, but this will doom you to a future full of exceptions that will be hard to grasp and to fix. In this video I show you exactly how Blazor interactive server components work in .NET 8 and explain how their behavior might affect the DbContext and EF Core. Also I show how we can alternatively use IDbContext factory instead of the regular DbContext and explain why this is definitely a better idea.
#dotnet #blazor #efcore
Join this channel to get source code access and other perks:
/ @codewrinkles
CONTENT
1. Intro: 00:00
2. Understanding the setup: 00:49
3. InteractiveServer Render mode under the hood: 01:51
4. How this affect the DbContext: 06:46
5. IDbContextFactory to the rescue! 11:48
Негізгі бет Ғылым және технология DON'T Use DbContext In Blazor Interactive Server Components! (.NET8)
Пікірлер: 56