How to insert-or-update without headache

#614 – June 28, 2026

Entity Framework Extensions fills the gap with BulkMerge across all major databases

How to insert-or-update without headache
16 minutes by Chris Woodruff

EF Core has no built-in upsert, and the common workaround of checking then writing causes one database round-trip per record, which collapses under large payloads. Raw T-SQL MERGE with a table-valued parameter solves this for SQL Server in a single atomic call, but requires hand-written SQL tied to one provider. Entity Framework Extensions fills the gap with BulkMerge, which handles inserts and updates in one call across all major databases, though always set a business key as the match column or every record silently inserts as new.

Your AI agent is guessing about performance (and it's bad at it)
sponsored by Jetbrains

Ask an agent why your app freezes and it'll scan your code, find something plausible-looking, and confidently point at the wrong thing. JetBrains Rider's new AI agent skill hands the agent a real profiler snapshot first – and the perfect root-cause diagnosis rate more than doubles! Evidence beats vibes.

Strongly typed generic object in C#
1 minute by Jiří Činčura

A generic class is built step by step to add type safety in C#. A self-referencing type constraint is added, then a non-null constraint on top. The result is clean but serves no real purpose.

Policy-based authorization in ASP.NET Core
12 minutes by Mukesh Murugan

ASP.NET Core has one authorization system: policies. Role and claim checks are just shortcuts that compile down to the same pipeline. A policy bundles requirements together using AND logic, while multiple handlers for one requirement use OR logic. Handlers run with full dependency injection, so rules can check databases, clocks, or external services. Set a fallback policy on every new API so forgotten endpoints fail closed instead of open.

Avoiding ToString allocations with StringBuilder.MoveChunks
7 minutes by Andrew Lock

In this post I take a short look at the new StringBuilder.MoveChunks API introduced in .NET 11 preview 5. First we'll described what the API does and how to use it, then we'll look at how it's implemented. Finally, we'll look at why this API was introduced.

The case of the empty IIS deployment
4 minutes by Barret Blake

A version mismatch between packages in a large .NET solution caused dotnet publish to silently generate an empty package. Because the conflict only triggers a warning rather than an error, the build pipeline showed green while deploying nothing. The fix was aligning package versions across projects, with plans to treat that specific warning as an error and add a deployment check to catch empty packages before they ship.

And the most popular article from the last issue was:

newsletters