Skip to content

JamieTaylor94/mentoring-dependencyinjection

Repository files navigation

Dependency Injection (DI)

Repositories I have labelled "mentoring" are from a time that I was taking on mentoring responsibilities of other developers. I like the idea of providing a lesson situation followed by a practical example. The developer would work through each part and then create a document of their learnings and then we would have a one-to-one session to go over the practical together.

What is dependency injection?

I've thought about how to best explain DI and after a search online realised, I cannot better explain it that this guy (Nick Hodges). At least read the first two articles - the website may not allow you to read the third, but it is more important you understand what DI is and its benefits.

What is dependency injection?

6 benefits of dependency injection

Five principles of dependency injection

Practical

First, familiarise yourself with the code

Make sure you can answer the following questions:

  • What is this application?
  • Where is the data coming from?
  • How does the data get onto the page?
  • What version of dotnet is being used?
  • Explain the order of events/walk me through it

There is a class VehicleServiceTests.cs that is incomplete that you need to get working.

Hints:

  • Learn how to do DI in dotnet core.
  • Modify code to use dependency injection
  • Create mocks for dependencies

Write up

Create a file called dependency-injection.md

Answer the following questions:

What is dependency injection?
Why do we use dependency injection?

Insert a link that goes to that file in the repo in your GitHub account.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published