Skip to main content
Christian Schou Køster

Christian Schou Køster

126 posts published

My name is Christian. I am a 29-year-old Solution Architect & Software Engineer with a passion for .NET, Cloud, and Containers. I love to share my knowledge and teach other like-minded about tech.

Denmark
C# Fundamentals (C#)

C# for Beginners

· Christian Schou Køster

ioptions, validate settings in .net, ioptions pattern, options pattern
.NET

Validate Settings Using The IOptions Pattern in .NET

· Christian Schou Køster

state design pattern, avoid if-else in .net
.NET

Avoid Complexity with the State Design Pattern in .NET

Struggling with complex if-else chains in your growing codebase? Let me show you how the state design pattern can simplify logic, boost maintainability, and make your code easier to scale—with a practical, real-world example of a document flow.

· Christian Schou Køster

github actions, build dotnet, test dotnet, github actions .net
DevOps

How To Use GitHub Actions To Build And Test .NET Projects

This short GitHub Actions tutorial will teach you how to use GitHub Actions with .NET. By the end of this tutorial, you will know an easy way of creating a new build template and publish it to your Git repository for your .NET project.

· Christian Schou Køster

dotnet, logging, ca1848
.NET

How To Achieve High-Performance Logging in .NET

Traditional .NET logging can slow your app. Switch to LoggerMessage delegates for better performance or leverage source-generated logging (in .NET 6+) for minimal runtime costs and cleaner code. Boost efficiency, reduce overhead, and log like a pro! 🚀

· Christian Schou Køster

Use JsonSerializer to Pretty-Print JSON in .NET
.NET Tips

Use JsonSerializer to Pretty-Print JSON in .NET

Formatting JSON as plain text with proper indentation can make it much easier to include in emails or other readable contexts. Here's a quick tip/guide on how to achieve that in .NET.

· Christian Schou Køster

.net, nameof, c#, refactoring
.NET Tips

Use nameof to Keep Code Refactoring-Safe

Using nameof in .NET helps make code more maintainable and resilient to refactoring. It returns names as strings tied to code directly, improving readability, refactoring safety, and compile-time error checking.

· Christian Schou Køster

Enhance String Semantics with the StringSyntax Attribute
.NET Tips

Enhance String Semantics with the StringSyntax Attribute

Learn how to use the StringSyntax attribute in .NET to clarify string formats like DateTime, JSON, or Regex, enhancing readability, IDE support, and reducing errors when writing .NET or C# code ✌️

· Christian Schou Køster

lxc, docker, lxc vs docker, lxc or docker
Docker

LXC vs Docker - What To Choose?

Building software is challenging, but ensuring it runs smoothly across different environments can be even more complex. Containers have become an essential solution for this, offering a streamlined way to package and deploy software reliably.

· Christian Schou Køster

docker, docker port mapping, port mapping, docker port, docker ports
Docker

How Port Mapping Works In Docker Compose

Learn how to use Docker Compose port mapping to manage container networking, with examples on basic mappings, multiple ports, port ranges, and advanced configurations. Perfect for solving container communication issues in any environment!

· Christian Schou Køster

base64, url encoding, dotnet 9, base64 encoding, .net base64 encoding
.NET Tips

URL-Safe Base64 Encoding With .NET 9

.NET 9 introduces a new Base64Url type for URL-safe Base64 encoding, solving the issue of unsafe characters like /, +, and =.

· Christian Schou Køster

docker, docker cheat sheet, docker cleanup, docker image remove, docker volume remove
Docker

A Docker Clean Up Cheat Sheet

Need to quickly clean up your Docker environment? Here's a simple list of Linux and PowerShell commands to remove old images, volumes, and containers. Just copy, run, and you're good to go 🚀

· Christian Schou Køster

null conditional operator, conditions, csharp
.NET Tips

Replace IF-Statements With Null Conditional Operators

Ever heard of the null conditional operator (?.) in C#? It helps make your code cleaner by safely accessing members or methods that might be null, returning null instead of throwing exceptions. A handy feature from C# 6.0! ✌️

· Christian Schou Køster

Do You Know About The File Access Modifier In C#?
.NET Tips

Do You Know About The File Access Modifier In C#?

The file access modifier in C# is like keeping your tools in the right drawer—everything stays organized, and nothing gets mixed up where it doesn’t belong!

· Christian Schou Køster

Why You Shouldn't Concatenate Strings Using "+" In Loops
.NET Tips

Why You Shouldn't Concatenate Strings Using "+" In Loops

Strings should not be concatenated using "+" in a loop. Learn what to do instead in this .NET tip. 💡

· Christian Schou Køster

keyset pagination
.NET Tips

What Is Keyset Pagination?

Keyset Pagination is also known as cursor pagination and is currently one of the fastest pagination techniques in .NET 🔥

· Christian Schou Køster

connect web api to web app, .net web api, .net web app, connect .net mvc to api
.NET

How To Connect A .NET Web API With A .NET MVC Web App?

With the world heading more and more into container services, we are changing applications into APIs communicating with each other. In this tutorial, you will learn how to connect a .NET Web API with a .NET MVC Web Application and nicely present the data with Bootstrap.

· Christian Schou Køster

validate urls with c#, c# url validation, validate url with regex, url validation, twv c#, how to validate url in c#
.NET

How To Validate URLs With C#

Learn how to validate URLs using C# with some of my code snippets in this C# tutorial and see what options is best in terms of performance.

· Christian Schou Køster

.net 8 data annotations, data annotations, length attribute, range attribute, deniedvalues, allowedvalues
.NET

The New Data Annotations in .NET 8

The latest LTS version, .NET 8, introduces new DataAnnotations for enhanced validation of strings and numbers. This article explores these annotations and shows you how to use them i practice.

· Christian Schou Køster

query splitting, assplitquery, ef core, entity framework core, ef core query splitting
.NET

How To Improve Query Performance Using EF Core Query Splitting

In the market for optimizing your database queries using EF Core? In this tutorial I will show you a practical example of using Query Splitting, the results in SQL and give you a heads up before implementing it in your application.

· Christian Schou Køster

Latest ReadMe

· Christian Schou Køster

My Top 4 Preferred Git Branching Strategies
Git

My Top 4 Preferred Git Branching Strategies

Looking for a brief/high-level overview of branching strategies? In this post, I will give you my top preferred branching strategies and tell you the pros and cons of choosing them and which one i would choose for what.

· Christian Schou Køster

dto, .net dto, data transfer object, how to use dto, dto usage
.NET

How to use DTOs the right way in .NET

· Christian Schou Køster

linux file system, linux file system hierarchy, linux
Linux

A Quick Introduction To The Default Linux File System Hierarchy (FSH)

· Christian Schou Køster

What Is DevOps?
DevOps

What Is DevOps?

· Christian Schou Køster

C# Fundamentals (C#)

Your First C# Program

· Christian Schou Køster