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

Some news about .NET 10: BackgroundServices and new String Comparer

Recently, there were two new features merged in .NET 10 I think are small little quality of life improvements: Avoid Blocking on startup with BackgroundServices and a new string comparer.

Read the whole article

Preview image blogpost

LINQ might get a "left join" operator in .net 10

LINQ has a Join operator, that basically translates to something like a SQL INNER JOIN. There is no built in operator for a LEFT JOIN in LINQ, but you can achieve the same result by using a combination of GroupJoin, SelectMany and DefaultIfEmpty. But there is a chance that this might change in the future, as there is a proposal to add a LeftJoin operator in .net 10.

Read the whole article

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

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