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

Recent Posts

Preview image blogpost

Quick one: Difference between collection expressions and collection initializer

Did you ever wonder if there is a noticeable difference between:

List<int> a = [1, 2, 3];
// And
List<int> b = new() {1,2,3};

Let's find out:

Read the whole article

Preview image blogpost
  • 8/18/2025
  • 1 minute read

Two more LINQ extensions in dotnet 10

The preview 6 of dotnet 10 brings two more functions: InfiniteSequence and Sequence.

Read the whole article

Preview image blogpost
  • 8/11/2025
  • 1 minute read

How to not return all properties in SqlRaw

Entity Frameworks SqlRaw has a small, sometimes annoying limitation:

The SQL query must return data for all properties of the entity type.

Sometimes that isn't desireable, so let's overcome that super easy.

Read the whole article

Preview image blogpost

Disabling thread safety check in Entity Framework

In this blog post we will have a look into how to disable the thread safety check in Entity Framework. What are the implications of doing so and how to do it.

Read the whole article

Preview image blogpost

Using Architecture Tests for CancellationTokens and sealed classes

Architectural Unit tests are nice to constraint your system (like which parts of your application can access other parts of your application). This blog post is not about that - that is covered a lot in the internet. No, I want to show what I did in a recent project: Checking if all controllers do use CancellationToken and some other entities are sealed.

Read the whole article

Preview image blogpost

Why Lists are not lowered to a while loop

Some while ago I was explaining what "Lowering" is. And the interesting part is that List behaves differently like an array while also a List is backed by an array. But why?

Read the whole article

Preview image blogpost

Adding test description for data-driven tests in xUnit

Often times, you find yourself in writing data-driven tests in xUnit (like Theory tests) and you want to add a description to each test case. Let's explore how to do that.

Read the whole article

Preview image blogpost

You can't use switch expressions in Blazor (sometimes)

Did you ever try to have a switch expression in Blazor? Yes, and did it go well? Sometimes not. Let's see why!

Read the whole article

Preview image blogpost

.NET 10 Performance Edition

As every year, the dotnet team adjusted the runtime and libraries to improve performance. So let's go over some of the highlights. I will link the corresponding blog post or GitHub issue for each item, so you can read more about it if you are interested.

And of course: You will find the benchmarks at the end of the article.

Read the whole article

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