The C# 9 init-only setters

In a previous post in which we discussed about the Null Object Pattern, we discussed of a hackish approach to make sure that the default properties cannot be changed. Please note that the code snippets from this post have been run in LinqPad so they can be used as is, to run them in Visual … Continue reading The C# 9 init-only setters

Download file via ajax

Hello and welcome 😀, In a previous post we discussed how to create a zip file on demand on the server so that it can be served via Web API. The code for the previous post and this one for can be found in my github repository. So today we're going to look at how … Continue reading Download file via ajax

Mocking LINQ Expressions

Hello and welcome In today's post, we will discuss mocking/stubbing lambda expressions so that we can have a bit more control over our unit tests. Keep in mind that I'm by no means versed in expression trees so I will try my best to explain. What is an Expression and how to use it Going … Continue reading Mocking LINQ Expressions

The rise of the Null-Object pattern in C# 8

Hello and welcome, As I probably mentioned in some of my older posts, I'm a big fan of code restrictions that can be imposed by the IDE. I think this is a reason why stylecop was/is so popular (I don't know since I mostly use Rider nowadays and Resharper for Visual Studio). Because of this, … Continue reading The rise of the Null-Object pattern in C# 8

Typed claims in ASP.Net Core 2.1

Hello and Welcome 🙂 Today I want to discuss about how we can use claims following a typed approach, this topic came about from a bug that was encountered during a code review for an application. As such I wanted to find a way of mitigating such issues in the future by using concrete classes … Continue reading Typed claims in ASP.Net Core 2.1

Logging Aspect what it is & where it is going

Hello, Intro Some might know of a library I did a few months ago about using PostSharp and designing a logging implementation following the Aspect Oriented Programming programming paradigm. For those who did now know about it, you can find the repository here. The project also came along with a few NuGet packages, but in … Continue reading Logging Aspect what it is & where it is going