Dependency injection fundamentals in C# - DI vs IoC vs DIP

  Рет қаралды 25,143

Amichai Mantinband

Amichai Mantinband

4 ай бұрын

In today's video we're going to cover Dependency Injection fundamentals.
We'll cover Dependency Injection (DI), the Dependency Inversion Principle (DIP), Inversion of Control (IoC, IoC container). We'll talk about what each of these are, what the difference between them is, and how we can apply these principals via an example and leveraging the Microsoft.Extensions.DependencyInjection nuget package.
Connect with me on 'em socials:
Twitter: / amantinband
LinkedIn: / amantinband
GitHub: github.com/amantinband
Check out all my courses on DomeTrain:
dometrain.com/author/amichai-...
Support the channel and get the source code:
/ amantinband
Thanks for watching, don't forget to like & comment & subscribe! ❤️ 💻

Пікірлер: 37
@tiffaleyshon1126
@tiffaleyshon1126 4 ай бұрын
Dude! I'm a programmer of over 20 years and I've never seen it explained this clearly and concisely before.
@nick_stelmakh
@nick_stelmakh 4 ай бұрын
agree
@joofville
@joofville 2 ай бұрын
Agree and subscribed
@omersoncruz1081
@omersoncruz1081 12 күн бұрын
Super agreed. Im loving this guy now. #Subscribed
@issamboutissante1542
@issamboutissante1542 4 ай бұрын
This video is amazing Can’t wait for the next one.
@BGivo
@BGivo 4 ай бұрын
Love your recent videos. Thank you!
@AK-vx4dy
@AK-vx4dy 4 ай бұрын
Nice clear and practical take. Excellent job !
@dhmilmile1
@dhmilmile1 4 ай бұрын
Thanks for the great explanation.
@user-ji7lq9nq2x
@user-ji7lq9nq2x 4 ай бұрын
great explanation amichai, thank you :)
@kamilmikua5794
@kamilmikua5794 3 ай бұрын
nice, we need more content like this, good job!
@mohannadqa5101
@mohannadqa5101 4 ай бұрын
5:06 Man, finally it clicked. I'm so happy thank you. Dependency injection. Such a fancy word for an obvious concept. But now it makes sense, you are injecting a dependency rather than sticking with a specific dependency.
@davood7497
@davood7497 3 ай бұрын
Clear and Concise !
@Luiz-yo2qf
@Luiz-yo2qf 2 ай бұрын
Hi mate. Awesome video! thank you for the great explanation.
@cyra9544
@cyra9544 7 күн бұрын
Thanks a lot!
@shahzadahmad-vg2ou
@shahzadahmad-vg2ou 3 ай бұрын
Bro, I was always confused between these terms, Thank you for this awesome video.
@Noone-bb5qh
@Noone-bb5qh 3 ай бұрын
I can’t thank you enough 🙏🙏🙏
@xerxesking6734
@xerxesking6734 4 ай бұрын
Awesome 👌
@thijsvandervegt3377
@thijsvandervegt3377 4 ай бұрын
Hey Amichai, have you ever thought about making videos about Modular Monoliths? Thanks for the video btw :)
@riccarrasquilla379
@riccarrasquilla379 4 ай бұрын
thanks for the video
@theanachronism5919
@theanachronism5919 4 ай бұрын
Awesome! Maybe I ask what you use for drawing on the screen during the screen record?
@daver94
@daver94 4 ай бұрын
Thanks ❤
@davidjiang7929
@davidjiang7929 3 ай бұрын
Another great lesson! Would you please consider making more videos on c# core concepts needed for .NET? 😊
@itsgddemon7573
@itsgddemon7573 4 ай бұрын
Could you consider making a video about what is the difference between making the validation inside the valueobjects, entities and with fluentValidation, could we mix and match these validations and what is the best approach.
@margosdesarian
@margosdesarian 4 ай бұрын
Hi Amichai, it would be great if you could slow down just a little bit - say 5%. Its a little hard to keep up at that speed :) OH dont worry, i discovered that you can run it at 75% speed., although you do sound as if you have had a few too many beers ...
@R3ap4r
@R3ap4r 4 ай бұрын
Standard procedure for me, Tim Corey -> Set speed to 1.25x , Amichai -> Set speed 0.75x == Learning curve exponential :)
@dashaenne
@dashaenne 4 ай бұрын
🤣
@greekplayback
@greekplayback 4 ай бұрын
תודה אלוף ❤
@adamsontag1874
@adamsontag1874 3 ай бұрын
Thank you for very nice and clean explanation. I have a few questions: 1. As you need Service provider to be built, does that mean that you can register services only on startup of the application or is there a technique to safely register services during runtime ? 2. Let's say I have DbContext from entity framework and I have two databases meaning they have two different connection strings. Is there a way to use EF with dependency injection in a way that would be able to resolve the correct database ? And again thank you for great explanation it was very helpful to me.
@JackFord322
@JackFord322 4 ай бұрын
What tool do you use to draw in your videos?
@FarmerWidmo
@FarmerWidmo 4 ай бұрын
Silly question, but what if GithubClient accepted some parameters as well? How would I register it in the DI container?
@PedroBarbosaRoman
@PedroBarbosaRoman 4 ай бұрын
Yes, I think you will have to do it. If you don't there could be an error in runtime possibly since the DI library he is using seems to be like that. There are also build time DI frameworks I think. Android developer here so take this with a grain of salt!
@devgenesis6436
@devgenesis6436 4 ай бұрын
what is the tool fro drawing diagrams in vscode
@devfric3149
@devfric3149 3 ай бұрын
It might be a tool on the video recording sofware but not sure what he is using.
@danielrobinson8629
@danielrobinson8629 2 ай бұрын
סרטון מעולה אחי, מאיפה האנגלית?
@cuongay9005
@cuongay9005 29 күн бұрын
skills of 9.0-IELTS Listener
Make the .NET CLI Your Best Friend | .NET & C# Essentials
19:41
Amichai Mantinband
Рет қаралды 13 М.
Learn Dependency Injection and Write Better Code
21:52
Amigoscode
Рет қаралды 167 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 78 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 1,5 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
What is Dependency Injection in .NET?
7:31
DotNetMastery
Рет қаралды 21 М.
Clean Architecture vs Domain-Driven Design (DDD) - Understand the Difference
11:26
Exceptions are evil. This is what I do instead.
24:41
Amichai Mantinband
Рет қаралды 17 М.
Event Storming Tutorial
12:06
Sourced Group an Amdocs Company
Рет қаралды 611
Making LINQ Blazing fast with PLINQ (Parallel LINQ) | .NET & C# Essentials
36:26
Dockerize Your .NET Application in 5 Minutes!
7:42
Amichai Mantinband
Рет қаралды 7 М.
What is Inversion of Control (IoC)?
5:28
Nutshell
Рет қаралды 17 М.
Stop Calling Your API a "REST API"
17:42
Amichai Mantinband
Рет қаралды 15 М.
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 95 М.
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 3,6 МЛН
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14
После ввода кода - протирайте панель
0:18