There's no step by step guide here, just a lot of projects to help drive a workshop/demo.
- Using 'new' is bad. It is so 1990.
- Using Container.GetMe() is better, but still bad.
- Having class constructors get you an IAnimal, is king!
Basically means that you should not create a difficult-to-discover dependencies inside a class! Therefore, var myDog = new Dog() is bad. Therefore, you should INJECT dependencies to classes that need them. Prefer the constructor.
Basically, it's the concept that you put the control of what implementations are used in a higher level. On a policy kind of level. Like in the program startup.
The 'container' is the place where you have all the rules, saying that for example "When you encounter an 'IAnimal' use a 'Dog'". Before using a container, you 'Register' all these rules. And then you resolve an abstract 'IAnimal', not the implementation 'Dog' by itself. You use the container to resolve your dependencies. The magic is telling your .NET applications to automagically resolve dependencies when it encounters them, so that you dont have to work with the container directly.