The .NET dependency injection methods you are not using

66934
114
2649
19.05.2022
Nick Chapsas

Nick Chapsas

14173719
145000
293
29.11.2011
GB
Описание видео:

Use code DEPS for 20% off (first 50 people): 🤍nickchapsas.com/p/from-zero-to-hero-dependency-injection-in-net Become a Patreon and get Discord & source code access: 🤍🤍patreon.com/nickchapsas Check out my courses: 🤍nickchapsas.com Hello everybody I'm Nick and in this video I will introduce you to, hopefully, a few dependency injection methods for the built in IoC container that you might not know about. Some of the names can be deceiving so once you finish watching this video you should know everything you need to write some awesome IoC code. Don't forget to comment, like and subscribe :) Social Media: Follow me on GitHub: 🤍bit.ly/ChapsasGitHub Follow me on Twitter: 🤍bit.ly/ChapsasTwitter Connect on LinkedIn: 🤍bit.ly/ChapsasLinkedIn Keep coding merch: 🤍keepcoding.shop #csharp #dotnet #dependencyinjection

Кадры из видео
The .NET dependency injection methods you are not using
The .NET dependency injection methods you are not using
The .NET dependency injection methods you are not using
The .NET dependency injection methods you are not using
Тэги из видео
Комментарии пользователей:
Lasindu Nuwanga
2022-07-08 08:51:10

I am using .NET DI for years and this video still has a hell of things I did not even know to exist. Thanks

Devian
2022-07-04 00:41:08

Dude why are you not on Udemy?

Eric Ruder
2022-06-26 09:04:58

Singleton/transient/scoped all refer to the lifetime of the implementation, not to the amount of implementations for a abstraction! Consider the fact that you can register both a singleton and transient for the same abstraction and it still works as expected: the singleton is shared and the transient is unique for each branch of the object graph. Even if they are delivered behind a IEnumerable. This technique Nick is showing is incredibly powerful coupled with the strategy pattern. Keep up the good work Nick, love your videos! Great length and very focused.

Alan Darkworld
2022-06-24 20:36:39

I'm still not sure what's the better way to wire things together - the explicit model (as seen in the video) or the annotation- and classpath-scanning driven approach used by Spring Boot. I've used both extensively, and saw success (and failure) with both.

Misha
2022-06-09 23:07:48

This is the cli dependency injection command you ain't using but should be: "dotnet add package Autofac"

Kunal Mukherjee
2022-05-31 18:29:05

What is the highlighter you use to draw rectangle and points on the screen

der.Schtefan
2022-05-27 10:01:51

Horrible. When I moved from .net to Java Spring, all these nightmares disappeared. Explicit stupid constructors? Lombok. Component registration? Single attribute. (annotation). All the mentioned things cleverly handled for you.

Daniel Guimarães Scatigno
2022-05-26 17:24:32

Are a good guitar player?😁

Giorgi Bakhturidze
2022-05-26 16:04:36

iQ8cNI7a6mk&t=9m12s 9:12

full moonyeah
2022-05-26 14:54:26

will that behavior of tryaddsingleton will not change on the future? because all I know is MS has unsettling minds and changes anything that has some breaking changes.

Branislav Petrović
2022-05-26 13:10:01

Nice and useful video, thanks!

Kokujou5
2022-05-25 17:26:14

how... useful...
and now tell me how to implement dependency injection without the frustrating need to specify the type i want to register 3 times!
1st as a private readonly, 2nd as constructor parameter 3rd as an assignemnt in the constructor body
thank you...
i hoped c#11 would have a revelation for that...
this is so annoying, you know what i'm doing now? i'm actually converting all my classes to records, just to get rid of the constructor which is basically abusing the whole thing XD
but it works and there is no performance or memory downside so ... who cares. abusing rules

Isaac Zais
2022-05-24 23:48:41

Huh, the .Net DI container is really odd in it's opinions. I'd consider nearly everything in this video bad practice, but the thing I use all the time (Decoration) isn't supported by design. I guess I'll just keep shimming in SimpleInjector until the .NET DI container actually supports decorators.

Michael Guillaume
2022-05-24 10:40:05

Nice video thank !
What keyboard are you using ? I have changed for a Logitech MX Key mini but I have lost so much dexterity ...

Swedish programmer
2022-05-22 09:45:27

Dependency injection is awesome! 👍 The company I work for, use it very well.

FOLKS, you should learn it!

autoexec_bat
2022-05-21 19:56:00

Nick, I really like your videos content-wise, but you are talking way too fast. English is not my first language and I find it difficult to follow sometimes.

Erik Lallemand
2022-05-21 12:25:29

I can't figure out when you would want to register more than one implementation of a given interface. If anyone knows, I'm curious about that.

Magnus Sydoff
2022-05-20 22:48:09

Is there a way to override the instance used in the DI container?

In Unity I believe that there is something called DependencyOverride, where you can supply the instance yourself effectively overriding what's already registered with the container?

That would be useful.

Mantas Kentra
2022-05-20 19:57:46

Holy crap this is ugly. C# > Java propaganda is real

Что ищут прямо сейчас
rv 3 delay hindi phrases Welding bageshwar dham sarkar ka bhajan PLEDIS canbroke urlaub palli FELIPE HEIDERICH Iceland Judoka как получить бесплатный лес от государства grafik dizayn maoshi мегазвезда squonk ГЕТТО РЕСПА Na pa duwa na pa hunar kegy Niyam Salami ramnavami dj K pop svarkaqilishusullari
Похожие видео
05.01.2022
You are doing .NET logging wrong. Let's fix it

You are doing .NET logging wrong. Let's fix it

28.05.2022
Don't throw exceptions in C#. Do this instead

Don't throw exceptions in C#. Do this instead

16.02.2021
The refactoring test (1) - Dependency Inversion & Unit tests | Cracking the .NET interview

The refactoring test (1) - Dependency Inversion & Unit tests | Cracking the .NET interview

09.07.2021
What is Span in C# and why you should be using it

What is Span in C# and why you should be using it

02.12.2020
20 Nuget packages that every .NET developer should be familiar with

20 Nuget packages that every .NET developer should be familiar with

10.06.2021
Making async code run faster in C#

Making async code run faster in C#

04.08.2022
Stop using the HttpClient the wrong way in .NET

Stop using the HttpClient the wrong way in .NET

09.09.2021
5 open source .NET projects that deserve more attention

5 open source .NET projects that deserve more attention

20.12.2021
What are record types in C# and how they ACTUALLY work

What are record types in C# and how they ACTUALLY work

20.02.2021
The refactoring test (2) - Open-Closed, Single Responsibility | Cracking the .NET interview

The refactoring test (2) - Open-Closed, Single Responsibility | Cracking the .NET interview

08.09.2020
8 await async mistakes that you SHOULD avoid in .NET

8 await async mistakes that you SHOULD avoid in .NET

13.06.2022
Dependency Injection in .NET Core (.NET 6)

Dependency Injection in .NET Core (.NET 6)

28.05.2022
Why I won’t need constructors anymore in C# 11

Why I won’t need constructors anymore in C# 11

17.05.2022
Attributes get a feature long-overdue in C# 11

Attributes get a feature long-overdue in C# 11

26.05.2022
The setup

The setup "trick" that .NET libraries use and you should too

07.09.2022
The CORRECT way to implement Retries in .NET

The CORRECT way to implement Retries in .NET