Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Personal Transformation Meditation Life Purpose Coaching Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee

This course includes:

  • 3 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
IT & Software Operating Systems Dependency Injection

Dependency Injection in .NET 5 (.NET Core)

Learn the basic foundation of Dependency Injection in ASP.NET Core / .NET 5 web applications.
Bestseller
Rating: 4.5 out of 54.5 (91 ratings)
567 students
Created by Bhrugen Patel
Last updated 6/2020
English
English
30-Day Money-Back Guarantee

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

5 sections • 47 lectures • 2h 57m total length

  • Preview02:04
  • Preview02:08
  • Preview02:02
  • Dependency Injection Intro 1
    03:52
  • Preview03:08
  • Preview02:25
  • Create Project
    02:23

  • 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

  • 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

  • Constructor and Action Injection
    04:24
  • View Injection
    03:39
  • Middleware Injection
    03:13
  • Different ways to register service
    01:50

  • 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

Instructor

Bhrugen Patel
Passionate Software Developer
Bhrugen Patel
  • 4.5 Instructor Rating
  • 12,050 Reviews
  • 76,268 Students
  • 20 Courses

I am a passionate and creative software engineer with a strong focus on simplicity and thorough details. I have been programming since high school and I have been involved with multiple web and desktop using .net.

I have a master's of science degree in computer science and a Bachelor of Computer Engineering. I also have many years of experience with .NET C# and .NET MVC. I enjoy teaching along with my full-time job.

For me, the most important part about writing and teaching code is to eliminate the hardships of every student out there who is willing to learn but cannot find adequate resource which is easy to understand. Coding is a way to be creative and have fun! 

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.