This solution contains a set of projects which should help you understand to following topics:
- IoC/DI (Inversion Of Control/Dependency Injection principles).
- IoC containers.
- Microsoft Unity IoC container.
- It also touches on highly related topic which is Unit testing.
- Provide 'hands-on experience' course on the topics above in form of small coding tasks.
- Help to guys on the team to understand the topic.
- Deliver sample solutions for all tasks which can serve as a reference with intent:
- At first try to resolve tasks on your own.
- If you will get stuck feel free use appropriate sample solution to unblock yourself.
- After you solved it on your own, look at the sample solution to make sure we understand it in the same way.
- The best theoretical source on inversion of control and dependency injection is probably Martin Fowler's article
- There is also very useful StackExchange thread which is dedicated to the above mentioned article and is very helpful in understanding that IoC can have many forms
- The rest of sources includes:
- MSDN article
- Two CodeProject articles, DI vs IoC and IoC with examples
- two PluralSight courses, one dedicated to IoC in general and the other in regards of ASP.NET MVC
- Microsoft Unity reference guide on MSDN
- NUnit unit testing framework:
- Moq mocking framework
- Each project is a prepared coding task.
- Each project contains README.md file which provides brief summary of the topic and goals for the task.
- For additional information look into the Microsoft Unity documentation (goal of this project is not to provide reference guide to MS Unity API).
- Simply clone this project (or download it as a .ZIP file) and attempt to solve all individual tasks.
- If you need some help just reference to solutions repository.
- Open the solution in VS2012+ and compile it. The compilation would download dependencies from Nuget (such as Microsoft Unity).
- If you are aware of some interesting challenge in the area feel free to propose a sample tasks with sample solution in form of pull request.