Tag Archives: C#

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

ASP.NET Core 1.0’s DNX and MSTest

Intro DNX is .NET’s new cross platform Execution Environment that was developed next to ASP.NET core 1.0 (formerly known as ASP.NET 5)[1]. I came across multiple sources (here for instance [2]) that claimed you can’t write tests for code based … Continue reading

Posted in .NET programming, ASP.NET Core 1.0, DNX, MSTest | 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 , , , , | 2 Comments

Increase productivity with XML documentation

Intro This post was originally a guest blog which you can find: here. Let’s talk about commenting code for a second. I was triggered by this rant http://blog.codefx.org/techniques/documentation/comment-your-fucking-code/ to examine how we actually do this on our team. And as … Continue reading

Posted in .NET programming, Visual Studio | Tagged , | 1 Comment

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 , , , , | 2 Comments