Dependency Injection Deep Dive | .NET & C# Essentials

  Рет қаралды 30,227

Amichai Mantinband

Amichai Mantinband

Күн бұрын

Пікірлер: 44
@amantinband
@amantinband 11 ай бұрын
Cheers 🥂 0:00. Opening 0:59. Registering controllers 2:43. Registering services 7:18. Implementing what ASP.NET does using the IServiceCollection and the ServiceProvider 09:10. Transient lifetime 11:21. Singleton lifetime 18:38. Scoped lifetime 27:35. Multiple Registrations 30:16. Keyed services 32:44. TryAdd methods 34:20. Service descriptor and the Add method 35:20. TryAddEnumerable
@shahzadahmad-vg2ou
@shahzadahmad-vg2ou 10 ай бұрын
Absolutely fantastic tutorial! The depth of explanation is unparalleled. Keep up the great work!
@voidmice1669
@voidmice1669 11 ай бұрын
Finally cleared out for me the difference between AddScoped and AddTransient. Thanks! 😊
@martinlabastie3518
@martinlabastie3518 11 ай бұрын
This sereies is amazing, please never stop
@EzequielBinker
@EzequielBinker 11 ай бұрын
Excellent video Amichai. You're great!!
@Andy01010
@Andy01010 11 ай бұрын
Great stuff, tbh you have a good chance to lead the c# and .net learning for us mortals. The more people understand it the more it is used
@naftalyweinberger7892
@naftalyweinberger7892 10 ай бұрын
thanks amichai, i like when u talk fast, its more easy.
@HackerUC
@HackerUC 9 ай бұрын
Best explanation I've heard on DI. 👍🏼
@lucaciandrei
@lucaciandrei 9 ай бұрын
very clear and concise explanations, congrats and to many more tutorials
@longuinni
@longuinni 11 ай бұрын
Really nice introtuction to DI.
@sushilb7994
@sushilb7994 11 ай бұрын
Yet another wonderful video from Amichai ❤ thank you…
@Philippe42460
@Philippe42460 11 ай бұрын
Hi Amichai, Thank you very much for this very good introduction to service registration, this will be very useful for my new colleagues. 👍
@greekplayback
@greekplayback 11 ай бұрын
תודה אלוף
@neroamayo6345
@neroamayo6345 11 ай бұрын
Great content. Please keep it up.😇😇
@aldkdenedik2451
@aldkdenedik2451 11 ай бұрын
Really nice
@vascofernandes6192
@vascofernandes6192 11 ай бұрын
Fantastic video
@AmirHashemZadeh
@AmirHashemZadeh Ай бұрын
well done dude
@CousinAnthony
@CousinAnthony 2 ай бұрын
Great step by step explanation of DI. What guidelines to you use to determine is a class is a "Service" of a "Client"? Is this mostly a convention preference? .
@rosmisha
@rosmisha 21 сағат бұрын
Great video. But why is it that 90% of the time all the activity occurs in a small part of the image because the explorer is on the left and the file is on the right?
@mckayanderson2046
@mckayanderson2046 9 ай бұрын
So good Amichai! I'll be purchasing your courses and recommending to friends. Have you dug into Microsoft's Semantic Kernel yet? The documentation and current tutorials from the team are really scattered and confusing and I didn't find a single good example of applying good DDD and Clean Architecture. I won't need it by the time you're done, but it might be a good opportunity for you.
@gerardwisse406
@gerardwisse406 10 ай бұрын
Another great video. Thx for sharing and keep up the good work. And just out of curiosity, what tool do u use to draw those colorful arrows and rectangles?
@joshmeyers2034
@joshmeyers2034 10 ай бұрын
I always share your videos with my team. So detailed and easy to digest. What kind of annotating tool do you use? I can't find anything remotely like it other than zoomit 🙂
@shayvt
@shayvt 10 ай бұрын
Thank you Amichai for another great video. Regarding keyed services - is it ok to use it or is it a code smell? When I have more than one implementation, I usually create a factory class, register the factory and the implementations in the container, get the IEnumerable to the factory, and use the factory to pick the implementation. What do you think? Another thing - do you know if there is an option to register all the implementations of an interface from an assembly? I saw it in other container and I think it could be very useful. תודה 🙂
@alexandernava9275
@alexandernava9275 9 ай бұрын
I am confused on the lifetime of a single request for scoped. What is that? Like is there a timeout for each "session" on a browser?
@ivandrofly
@ivandrofly 9 ай бұрын
What is the name of the tool that you are using for highlighting and creating arrows? PS: I've been using ZoomIt from Microsoft Sysinternals
@DavidSmith-ef4eh
@DavidSmith-ef4eh 10 ай бұрын
I wish we had such things in PHP. In php di system, everything is just a singleton, had to create my own DI service to be able to have factories/transient services. Maybe in 20 years, php will catch up to this.
@seba123321
@seba123321 11 ай бұрын
Can you recommend a solution/library/helper for scenario where you have a lot of classes and corresponding interfaces. Scan of dlls and bulk registration. Registration by conversion: IService1 and Service1. I'm sure that there must be an easy way to do that.
@amantinband
@amantinband 11 ай бұрын
I have a video in my backlog on dynamic DI registration using a few different NuGet packages
@iammahie
@iammahie 11 ай бұрын
Nice video , can you share the extensions that you use for dotnet development?
@amantinband
@amantinband 11 ай бұрын
This is pretty similar to what I’m using today: kzbin.info/www/bejne/o2qrp6Z4ZpKbd9Esi=TKZqbOSktM_Y5FHl
@thijsvandervegt3377
@thijsvandervegt3377 11 ай бұрын
Hey Amichai 👋 , any chance you're making a Deep Dive course on DDD on Dometrain sometime soon?
@amantinband
@amantinband 11 ай бұрын
Working on it as we speak 💪🏼
@allwinantofranklin895
@allwinantofranklin895 9 ай бұрын
Can you share how to implement DI in .NET Framework. It will be very useful for lot of Company who are struck with Framework. I think with using DI in Framework we can refactor the code to match .NET Core style and make the migration process easy... What is your opinion in this?
@parkerwarner8688
@parkerwarner8688 11 ай бұрын
Are keyed services essentially an implementation of the factory pattern or am I misunderstanding that?
@amantinband
@amantinband 11 ай бұрын
Not exactly
@parkerwarner8688
@parkerwarner8688 11 ай бұрын
@@amantinband would love to hear more, thanks!
@shayvt
@shayvt 11 ай бұрын
Do you prefer vscode over vs or rider?
@amantinband
@amantinband 11 ай бұрын
Yep
@az6876
@az6876 11 ай бұрын
This video can be defined as a reference to definitively understand dependency injection in c#. Can I ask you what you think about the class constructor in C# defined like this: public class NumbersController(NumberService numberService) { private readonly NumberService numberService = numberService; // also I can add ?? throw new ArgumentNull... ... } Thanks
@amantinband
@amantinband 11 ай бұрын
Looks good, but the exception throwing is redundant since the DI container with throw an exception if it cannot resolve a dependency
@az6876
@az6876 11 ай бұрын
@@amantinband Thank you
@ygx8305
@ygx8305 Ай бұрын
Dude slow down a bit. Explain slowly and stop jumping around.
@heathens2867
@heathens2867 21 күн бұрын
Exactly
ASP.NET Web APIs Explained in 9 Minutes
9:03
Amichai Mantinband
Рет қаралды 24 М.
Dependency injection fundamentals in C# - DI vs IoC vs DIP
13:30
Amichai Mantinband
Рет қаралды 47 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Solid Principles Interview Questions in C#
32:33
Questpond
Рет қаралды 10 М.
Making LINQ Blazing fast with PLINQ (Parallel LINQ) | .NET & C# Essentials
36:26
Why Every .NET Developer NEEDS Dependency Injection
10:00
Patrick God
Рет қаралды 14 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 921 М.
Clean Architecture vs Domain-Driven Design (DDD) - Understand the Difference
11:26
5 Rules For DTOs
17:56
Ardalis
Рет қаралды 48 М.
5 C# Naming Conventions I Wish Everyone Followed
12:46
Amichai Mantinband
Рет қаралды 19 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН