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

LinkedIn: "Are you still using new Random() everywhere?"

You need some advice around Random? Sure there is something on LinkedIn for that. Let's have a look.

Read the whole article

Preview image blogpost

Inlining and structs in C#

In this - somewhat technical and barely usable - blog post, we will have a look at inlining and structs in C#. And how they can optimize performance in some interesting ways.

Read the whole article

Preview image blogpost

ToDictionaryAsync retrieves the whole object from the database in Entity Framework

In Entity Framework Core ToDictionaryAsync (and of course) also the the synchronous counter part ToDictionary retrieve the whole object from the database.

Read the whole article

Preview image blogpost

Divide and Conquer the Database

For a lack of a better title, this blog post shows a database improvement that helped me quite a bit and what to do to make it work.

Read the whole article

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

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