Hey, I'm Steven a .NET Developer and Freelancer in Zurich, Switzerland. I am a Microsoft MVP. Also, this blog is open source on GitHub.

Recent Posts

Preview image blogpost

Having fun with ValueTuple

Just as a heads up: This blog post will probably bring you 0 value in your daily life - well, maybe a short smile. Let's put ValueTuple to its extreme!

Read the whole article

Preview image blogpost

"Always use early returns" - LinkedIn Edition

Ahhhh dear LinkedIn - a pool of gems where everyone is expert in everything. Over the time I collected some trophies from there and today I want to discuss one of them: "Always use early returns".

Read the whole article

Preview image blogpost

How to assert assumptions in code that might not be true?

Sometimes we have to make assumptions in our code. For example, that a certain property or variable has a specific value. On top comes, we have a specific idea but we are not 100% sure if they are correct. Let's meet Debug.Assert.

Read the whole article

Preview image blogpost

An awaitable Blazor Modal Dialog

I already showcased a simple modal dialog in a previous post. However, the dialog was not awaitable. In this post, I'll show you how to create an awaitable modal dialog.

Read the whole article

Preview image blogpost

Be careful with ToListAsync and ToArrayAsync in Entity Framework Core

Entity Framework has two methods for converting a query to a list or an array: ToListAsync and ToArrayAsync. Of course there is also the sync version of these methods: ToList and ToArray. And sometimes, you should use the latter one!

Read the whole article

Preview image blogpost

ToArray(Async) vs ToList(Async) in Entity Framework 8

When retrieving data from your database with Entity Framework, there are two major options: ToArray and ToList. Besides the different return type, is there any significant difference in performance between the two? Let's find out!

Read the whole article

Comparing the performance between the Minimal API and classic Controllers

Today, we are going to benchmark the performance of the Minimal API in ASP.NET 9 (and for reference against ASP.NET 8 as well) against the classic Controllers. We will test a few scenarios and check how the performance of the Minimal API compares to the classic Controllers. Let's get right into it!

Read the whole article

Preview image blogpost
  • 10/14/2024
  • 1 minute read

Git Tricks: Get the last checked out branch

In this blog post I will show you two tricks how to easily switch between a branch back and forth and how to get the last checked out branches.

Read the whole article

Preview image blogpost
  • 10/7/2024
  • 3 minute read

Centralize your packages in .NET with NuGet

A feature that isn't really new but still didn't get my attention until recently is: "Central Package Management". So let's have a look at this in this blog post.

Read the whole article

Preview image blogpost

xUnit v3 and some stuff about TUnit

I know that there is a lot of fuse about TUnit and I am here writing about xUnit. I might cover TUnit in the future, but for now, the topic is the v3 prerelease of xUnit!

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload x