Category Archives: Dependency Injection

Realworld example ASP.NET Core 1.0’s Middleware

Synopsis: HTTP Modules and HTTP Handlers are not used anymore with ASP.NET Core 1.0. But what if your web app relies on HTTP Modules/Handlers to function? Well, I had a web application that relied on HTTP Modules and a Handler. … Continue reading

Posted in .NET programming, ASP.NET Core 1.0, ASP.NET MVC, C#, C# 6.0, Dependency Injection, DNX | Tagged , , , , , | Leave a comment

Unit Testing made easy with Dependency Injection

Synopsis: An example in which we walk through a case in which Dependency Injection made writing automatic tests, and in particular unit tests, a delight. Which also makes the discipline Test Driven Development much more an option. Find the example … Continue reading

Posted in .NET programming, Agile Scrum, Dependency Injection, Software design patterns | Tagged , , , , | 4 Comments

Real World Example of Adding Auditing With Dependency Injection’s Interception

Synopsis: This article walks through a real world example in which the Crosscutting Concern (1) ‘Auditing’ was added to the application without breaking the Single Responsibility Principle (2), nor the Open/Closed Principle (3), by utilizing Dependency Injection’s Interception. Get the … Continue reading

Posted in .NET programming, Dependency Injection, Software design patterns | Tagged , , | 3 Comments

Real world example of Dependency Injection based on run-time values

Synopsis: This is a  real world example from my work in which I solved a Dependency Injection problem, where the dependencies are based on run-time values, with an Abstract Factory. Get the example from my GitHub: https://github.com/DannyvanderKraan/EntityActionAbstractFactory Intro Last time I introduced … Continue reading

Posted in .NET programming, C# 6.0, Dependency Injection, Software design patterns | Tagged , , , , , | 2 Comments

Real world example of Dependeny Injection

Synopsis: Real world example in which Dependency Injection is used to be able to replace a class without recompiling. Github: https://github.com/DannyvanderKraan/LogInService.git Intro I was  trying to wrap my head around Dependency Injection, one of the many practices which helps you … Continue reading

Posted in .NET programming, C#, Dependency Injection, Software design patterns | Tagged , , , , | 5 Comments