Lesson 5: Using Dependency Injection in Minimal Web API
In this lesson you learn about Dependency Injection (DI) in Minimal Web API. Service containers, service lifetimes, and a practical demonstration of DI is shown.
Content
Dependency Injection Overview 00:00
Services Container 01:03
Why Dependency Injection 01:55
Service Lifetimes 03:19
DEMO: Settings Class and a Scoped Lifetime 05:01
DEMO: The Settings Class Used in Two API Calls 07:12
DEMO: Using an Interface in Dependency Injection 10:16
Lesson Summary 14:45
You can get all the samples and hands-on labs for this course at https://www.pdsa.com/YouTube.
If you are interested in generating Minimal Web API projects, check out my FREE PDSC Developer Utilities at https://www.pdsa.com/Utilities.
#minimalwebapi #webapi #dependencyinjection #di #csharp #development #programming #dotnet #dotnetcore #dotnet6 #dotnet7 #dotnet8 #pauldsheriff #pluralsight #youtube
Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.
Paul.Contact()
Website: https://www.pdsa.com
Email: [email protected]
LinkedIn: / paulsheriff
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff