Dependency Injection in .NET 5 (.NET Core)
4.7 (40 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
275 students enrolled

Dependency Injection in .NET 5 (.NET Core)

Learn the basic foundation of Dependency Injection in ASP.NET Core / .NET 5 web applications.
Bestseller
4.7 (40 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
275 students enrolled
Created by Bhrugen Patel
Last updated 6/2020
English
English
Current price: $69.99 Original price: $99.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Dependency Injection in .NET 5 (.NET Core)
  • Need for Dependency Injection
  • Service Lifetime for Dependency Injection
  • Injecting services in Middleware
  • Injecting services in Views
  • Injecting services in Controller/Actions
  • Different ways to register services
  • Registering interface multiple times
  • Adding, removing and replacing service registration
  • Register multiple implementations
  • Framework services like ILogger
  • Custom repository pattern
Requirements
  • Fundamentals of ASP NET Core MVC
  • Basics of SQL Server
  • Basic HTML/CSS knowledge
Description

Dependency Injection is one of those terms that are used very often and are not understood most of the time.

This course will teach you everything you need to know about using dependency injection in ASP.NET Core. The skills you will learn will help you to build and architect complex ASP.NET Core applications that make full use of dependency injection. We will start with the basics of Dependency Injection and then we would dive into advanced concepts.

In old times we had to use third-party libraries for dependency injection but with .NET Core / .NET 5, dependency injection has been an integrated part of the .NET and it has great capabilities!

We will learn about all the topics that are needed to master Dependency Injection. By the end of the course, you will be fluent with all questions when it comes to dependency injection.

Who this course is for:
  • C# Developers
  • Anyone interested in learning Dependency Injection in .NET Core / .NET 5
Course content
Expand all 47 lectures 02:57:25
+ Registering First Service
7 lectures 27:51
Setting up Non DI Scenario Part 1
04:36
Setting up Non DI Scenario Part 2
04:44
Issues without Dependency Injection
03:43
Extract to Interface
02:21
Constructor Dependency Injection
04:10
Registering Service in Container
05:18
Framework Services
02:59
+ Framework Services & Lifetime
10 lectures 45:42
AppSettings Setup
04:42
Configure AppSettings Keys to Container
03:13
IOptions Injection
06:57
Clean Up Startup Class file
04:12
Service Lifetimes
06:20
Create Lifetime Classes
03:21
Custom Middleware
05:10
Lifetime Controller
04:57
Service Lifetime Demo
05:01
Reviews
01:49
+ Service Injections
4 lectures 13:06
Constructor and Action Injection
04:24
View Injection
03:39
Middleware Injection
03:13
Different ways to register service
01:50
+ Advance Concepts
19 lectures 01:12:44
Advantages of Try Add
02:51
Register service multiple times
02:06
Replace or Remove Registrations
04:48
Project Setup Part 1
05:23
Project Setup Part 2
03:05
Validation Checker Service
04:37
Credit Validator Interface to use multiple services
05:12
Credit Validator Implementation
05:31
Demo - Multiple Service Implementations
01:50
DbContext Dependency
03:24
Improving multiple implementations
03:11
Conditional Implementation
05:26
Demo - Conditional Implementation
04:24
ILogger
03:21
Code Cleanup
02:31
Bonus - Implement Repository Pattern
07:56
Bonus - Repository Demo
03:09
Service Dependencies
02:55
Bonus Content
01:04