.NET 5 Dependency Injection

preview_player
Показать описание
Since the release of .NET Core (now.NET 5), more developers are making use of dependency injection by using the default Microsoft Dependency Injection container that comes out of the box with .NET Core. This default implementation is sometimes limited in what it can do when compared to the features found in other containers available for the platform. In addition, there are some pain points that you may encounter if you have not read all of the documentation.

Agenda:
0:00 - Introduction
1:15 - .NET 5 Dependency Injection refresher
9:48 - Service Lifetimes
13:03 - When to use a singleton?
17:20 - Transient dependencies
17:49 - Scoped dependencies
28:09 - Handling disposables
31:15 - Common mistakes
33:39 - Handy tips and tricks
33:44 - Deliberate multiple registrations
35:28 - Same class, many interfaces
36:37 - Open generics
38:32 - Constrained generics
39:35 - Design patterns
47:27 - Working around limitations
48:00 - Registering value types
49:20 - Registering C#9 records
50:21 - Register delegates instead of interfaces
53:26 - Named and keyed dependencies
57:01 - Decorator pattern
59:32 - Summary
1:02:32 - Q&A
1:07:48 - Wrap-up

Categories: #dotnet #resharper #webinar

About the Presenter:
Steve Collins is an independent software developer with over 25 years’ experience in the industry working with Microsoft technologies.

Steve has been giving talks in person and virtually to user groups and community conferences around the UK, focusing on his pet subjects of Dependency Injection and Configuration in .NET.

Role: Independent Software Developer
Рекомендации по теме
Комментарии
Автор

I know Steve and he is a passionate .net person and this is a very useful insight into the world of DI and I would recommend this to anyone wanting to know more about Dependency Injection. Great stuff, Steve!

Munirs
Автор

I'm just wondering when yall gonna start giving a crap and fix the performance issues in Resharper

problemchild
Автор

I'm coding in VS 2019 without ReSharper Muhahahahaha

user