Dependency Injection with .NET Blazor

Gerald Versluis
Gerald Versluis
5.4 هزار بار بازدید - 3 سال پیش - In this video we will
In this video we will see how to use dependency injection with Blazor in .NET. The video shows Blazor Server, but this works the same way in Blazor WebAssembly and even ASP.NET (Core). We will learn about the different scopes like singleton and see how to inject on Razor pages.

💝 Join this channel to get access to perks:
https://www.youtube.com/GeraldVerslui...

🛑 Don't forget to subscribe to my channel for more amazing content: https://www.youtube.com/GeraldVerslui...

🐦 Follow me on Twitter: Twitter: jfversluis

🔗 Links
Sample Code Repo: https://github.com/jfversluis/BlazorD...
Dependency Injection Basics Video: Dependency Injection for Absolute Beg...

Blazor: https://blazor.net
Blazor Docs: https://blazor.net/docs

⏱ Timestamps
0:00 Intro
0:18 Preview End Result
0:52 Inspect Sample App
1:35 Register Dependencies & Scopes
3:40 Implement Dependency Injection Sample with Singleton
5:45 Construction Injection
6:30 Inject in Razor Pages
7:42 Running the Sample App
8:40 Change to Scoped
9:00 Sample App with Scoped
9:35 When To Use Which Scope?
10:20 Outro

🎥 Video edited with Camtasia (ref): https://techsmith.z6rjha.net/AJoeD

🙋‍♂️ Also find my...
Twitter: Twitter: jfversluis
Blog: https://blog.verslu.is
Twitch: Twitch: jfversluis
All the rest: https://jfversluis.dev

#Blazor #DependencyInjection #WebAssembly #ASPNET #csharp #dotnet
3 سال پیش در تاریخ 1400/02/10 منتشر شده است.
5,428 بـار بازدید شده
... بیشتر