.NET Core / C#

.NET Core / C#

.NET Core is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. It is an open source, cross platform successor to .NET Framework. The project is primarily developed by Microsoft and released under the MIT License.

Dependency Injection based on request headers
Dependency Injection based on request headers
.NET Core / C#, Dependency Injection

Dependency Injection based on request headers

Dependency Injection (DI) helps us to change the behavior of parts of our program on the fly. This is especially neat when you want to test your domain services against a mocked data-store. But what if you need to change the behavior of your API based on a request header?

Yesterday I had a discussion with my colleague Robert Kranenburg about this. He showed an example of a console application changing its behavior based on an argument. I took the idea and converted it into .NET Core 3.1 code to change behavior based on a cookie.

Building a high performing last viewed list using Redis
Building a high performing last viewed list using Redis
.NET Core / C#, Redis

Building a high performing last viewed list using Redis

We live in a day and age in which we can choose a data-store that matches the characteristics of our apps and (micro) services. Lately we’ve been looking into Redis as a high performing store for last viewed items. In this blog I’ll look show how to create a POC with the redis-cli and then implement it using .NET Core. We’ll be using the sorted set structure.

Regular Expression Groups: .NET vs JavaScript
Regular Expression Groups: .NET vs JavaScript
.NET Core / C#, JavaScript, Regular Expressions

Regular Expression Groups: .NET vs JavaScript

As a developer, I love to solve common string problems with regular expression. Sure, they are sometimes hard to read, but you can do so much with such a small expression! It is nice that many languages have support for them, but sometimes it feels like every language creates its own dialect. Let’s look at the difference between regular expression groups in .NET and JavaScript.