How to register and inject multiple implementations of one interface in .NET
There are times when you want to register multiple classes which all implement a common interface. One example could be a IValidationRule interface which is implemented by different validation rules, lets say NameNotEmptyValidationRule and the NameRangeValidationRule. We want these rules to run in order and validate user input. Let’s see this example in form of code:
My three favorite client-side performance measurements you can do with the Performance API
Lately I had to do some client-side performance measurements of a website. In the old days I would have to use the now() method of the Date object, however, we are now provided with the Performance API with some very handy methods. Let’s check together my three favorite measurements.
How to migrate your code for uploading files from .NET Framework to .NET Core
I recently had to migrate code, for uploading Excel, files from an older .NET Framework application to a new one which is based on .NET Core. I would like to share my learnings with you in a “before and after” form.
Use the HAVING keyword to count duplicates in rows of a SQL table
There are times when you want to find out duplicated values in rows of a SQL table. We are going to use the HAVING keyword to list the values that are present more than one time. Let us consider the following table with three columns and three rows:
Use the JsonConverter attribute to parse complex JSON object into a C# class
I was working lately with some complex JSON objects coming from the alphavantage, an API for getting meta information about stocks, currencies and the world economy in general, and had to overcome major issues before being able to deserialize the strings into my C# POCO classes.