Getting Started with Dependency Injection in .NET 2

Dependency injection helps us write better code. But when you don’t understand the why and how, it can be baffling. This course gives you a good foundation of the concepts and patterns so you can start writing code that is easy to change and test.

 

What you’ll learn

 

Tight coupling makes our code hard to change and test. In this course, “Getting Started with Dependency Injection in .NET”, you will learn the foundational knowledge to break tight coupling with Dependency Injection. First, you will learn how to use constructor injection to create loosely-coupled code. Next, you will see how to snap those loosely-coupled pieces together in different ways to easily change functionality. Then, you will discover how easy it is to unit test code that uses dependency injection. Finally, you will explore some of the magic of dependency injection containers. When you are finished with this course, you will have the skills and knowledge of dependency injection needed to break tight coupling and write more maintainable code.

1- What Is Tight Coupling and How Does It Impact Your Applications?

1
What is Dependency Injection?
2
Application Overview
3
Demo: Application Projects
4
Demo: The Data Store and Data Access Layers
5
Demo: The Presentation Layer
6
Demo: The View Layer
7
The Problem of Tight Coupling
8
Difficult Updates

2- Using Dependency Injection to Build Loosely-coupled Applications

1
The Repository Interface
2
Demo: Loosening Coupling with an Interface
3
Demo: Breaking Coupling with Constructor Injection
4
What is a Bootstrapper?
5
Demo: Adding a Bootstrapper

3- Taking Advantage of Loose Coupling

1
Different Data Sources
2
Demo: Adding a Text File Data Reader
3
Demo: Adding a SQL Database Data Reader
4
The Decorator Pattern and Client-side Caching
5
Demo: Adding a Client-side Cache

4- How Dependency Injection Makes Unit Testing Easier

1
What We Want to Unit Test
2
Demo: Adding a Fake Dependency for Testing
3
Demo: Unit Testing with Constructor Injection
4
Property Injection
5
Demo: Unit Testing with Property Injection

5- Dependency Injection Containers

1
Dependency Injection Container Features
2
Demo: Using Ninject
3
Demo: Using a Decorator with Ninject
4
Demo: Using Autofac
5
Demo: Manual Registration with Autofac
6
Demo: Using a Decorator with Autofac
7
Demo: Late Binding with Autofac
8
Demo: ASP.NET Core MVC Dependency Injection
9
Dependency Injection Container Summary
Add to Wishlist
Enroll Course

Enrolled: 1 student
Lectures: 32
Level: Intermediate

Archive

Working hours

Monday 9:30 am - 6.00 pm
Tuesday 9:30 am - 6.00 pm
Wednesday 9:30 am - 6.00 pm
Thursday 9:30 am - 6.00 pm
Friday 9:30 am - 5.00 pm
Saturday Closed
Sunday Closed
Getting Started with Dependency Injection in .NET 2
Price:
Free