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

Application triggers for Asp.Net Core 2.1 entity framework core

Hello and welcome 🙂 Today I wanted to talk about extending your application and your DbContext to run arbitrary code when a save occurs. The backstory While working with quite a few applications that work with databases especially using entity framework, I noticed the pattern of saving changes to the database and then do something … Continue reading Application triggers for Asp.Net Core 2.1 entity framework core

Branching authentication in Asp.Net Core 2.1

Hello and welcome 🙂 In the last post I hinted at using SignalR and query strings to branch how a user is authenticated. Backstory I ended up in this scenario when one of the requirements for the system was that it needs to be embedded into the client's system, that means that we would have … Continue reading Branching authentication in Asp.Net Core 2.1

SignalR metadata for Asp.Net Core 2.1

Hello and welcome 🙂 This will be a short post which will tie in with the next post about branching authentication in asp.net core using middleware. The problem Recently I encountered a situation in which I needed to pass to a SignalR hub additional data with every request, kinda like environment metadata from external systems. … Continue reading SignalR metadata for Asp.Net Core 2.1

Enhancing Asp.Net Core logging pipeline with Serilog

Enhancing Asp.Net Core logging pipeline with Serilog Hello and welcome :), Today I want to show how we can switch out the default logging pipeline in favor of Serilog which has a lot more providers implemented by the community and also provides a way to log structured data. The backstory For those of you who … Continue reading Enhancing Asp.Net Core logging pipeline with Serilog

Testing Entity Framework Core

Hello and welcome, In this post, we are going to have a look at how we can write automated tests using entity framework core. As in the recent previous posts, the code can be found here. The story A while back when working on a project, I wanted to do an integration test with a … Continue reading Testing Entity Framework Core

Background worker in ASP.Net Core

Hello and Welcome :), Today we are going to discuss how we can add functionality to an APS.Net Core application outside of a request. The code for this post can be found here. The story As some, if not all of you know, web servers usually only work in the context of a request. So … Continue reading Background worker in ASP.Net Core

Testing SignalR Hubs in ASP.Net Core 2.1

Hello and Welcome 🙂 As some of you might have heard, ASP.NET Core 2.1.0 went live at the end of last month. One of the features that come with this release is also the release of SignalR which for those who do not know about it, it's a library that allows for two-way communication between … Continue reading Testing SignalR Hubs in ASP.Net Core 2.1

Securing Ids on web applications

Hello and welcome 🙂 Recently I have been reading through the documentation and articles about how to protect our web applications from tampering when giving a form to the user. Looking at this, one realizes that the cause for these security measures is due to the inherent nature of HTTP, in that being stateless, we … Continue reading Securing Ids on web applications