Resolve Open Generics with ASP.NET Cores DI-Container

ASP .NET Core already has quite a decent di-container built in. However, there are some quirks you might need to be aware of. In one of my applications, I’ve been using a factory pattern to register my views by using open generics. To be more clear about that: I have an Interface IView<TView>, and I want to register all of this interfaces implementations. As I found out, Microsofts DI-Container currently doesn’t support that by default (text me if I’m wrong!...

November 10, 2020 · 2 min · Marcel Jurtz

Domain Redirection with .htaccess and PHP

I’ve been starting a new blog on my domain, for which I wanted to use the ‘blog’ subdomain. However, this subdomain was already in use for all my coding-related stuff. So, I decided to move my current blog from /blog to /coding and upload my new blog to /blog. So far, so good. Now I have both of my blogs up and running. There’s just one problem: Any incoming traffic to existing posts on my blog would resolve to 404s....

November 7, 2020 · 2 min · Marcel Jurtz

FluentValidation in ASP.NET Core

Have you been implementing the validation of your ViewModels in ASP.NET (Core) using DataAttributes so far? If so, chances are you’ve always been dissatisfied because your classes became messy and full of unnecessarily replicated code. Yes? Then today’s post is for you. FluentValidation FluentValidation is a way to define strongly typed validation for classes in the form of a Fluent API. The term fluent in this case refers to a code structure where a function always return the modified object....

October 5, 2020 · 4 min · Marcel Jurtz

How to create a profile README for GitHub

GitHub has been secretly pushing out a new feature in early july, that allows you to create a profile-level README-file. In todays post, I’ll be showing you, how you can create your own profile README to customize your own profile page according to your preferences. First of all, you won’t find this feature in your settings. To get started, you have to create a new repository with the same name as your username....

August 22, 2020 · 1 min · Marcel Jurtz

Editing Zwift Workouts in C#

I’ve been using Zwift pretty extensively for the last few months. For anyone unfamiliar: Zwift is a VR Biking platform. That means, you can put your bike on a smarttrainer, connect it to your pc (directly via ant+ / ble or by bridging with your phone), and then you can ride virtual worlds without having to go outside. Sounds not too bad, right? After a few sessions, just riding became kind of tedious, so I’ve tried to do some of the preconfigured workouts....

April 19, 2020 · 12 min · Marcel Jurtz