#618 – July 26, 2026
and why async is not enough
Building a database in a text file — why async is not enough
4 minutes by Yegor Sychev
Async code doesn't block threads, but it doesn't protect shared data either. Yegor shows the problem by building a simple file-based storage where 20 parallel writes cause crashes and data loss, because each task reads the same file, then tries to overwrite it. The fix requires explicit synchronization, which the next part of the series covers using SemaphoreSlim.
Rider's .NET Debugger in VS Code and Cursor? Yes, Really!
sponsored by Jetbrains
The ReSharper extension brings the Rider debugger engine to VS Code, Cursor, and other compatible editors. Enjoy full breakpoint support, watch expressions, step navigation, launch and attach for .NET, .NET Framework, Mono, and web apps, plus unit‑test debugging – and your existing launch.json configs are picked up automatically.
TimeProvider and the end of untestable DateTime.Now
6 minutes by Maarten Balliauw
Before .NET 8, every team solved the same problem differently: wrapping DateTime.Now in a custom interface so tests could control the clock. TimeProvider is the standard replacement that ships with .NET 8, so no more reinventing this. Maarten suggests using TimeProvider.System in production and FakeTimeProvider in tests. The fake lets you pin the clock to a specific moment and call Advance() to move time forward instantly, making cache expiry, retries, and timer callbacks fully testable without any waiting.
Multi-Tenant .NET: Shared database with partitions
14 minutes by Barret Blake
Multi-tenancy means many customers share one app and one database. A tenant ID column separates their data, and EF Core global query filters automatically add a WHERE clause to every query so each tenant only sees their own records. SQL Server table partitioning then physically groups each tenant's rows together, and because the filter already targets the partition column, the database skips irrelevant partitions entirely. Partitioning speeds things up but does not replace the query filter as the actual security boundary.
Creating dual use Windows GUI and console applications
19 minutes by Rick Strahl
Rick argues that building a Windows app that works as both a GUI and a command line tool is tricky because Windows forces you to choose one mode at compile time. He points out three approaches exist: a GUI app that attaches to a console, a console app that launches a GUI, and two separate programs sharing the same code. Each has a flaw, either messy console output, a brief terminal window flash, or the overhead of maintaining two projects. For most serious tools, separate executables offer the cleanest solution despite the extra setup.
How to prevent duplicate API requests in .NET
3 minutes by Yohan Malshika
Duplicate API requests happen more often than expected, caused by things like double clicks, network retries, or background jobs. Without proper handling, this leads to serious problems like double payments or corrupted data. Idempotency ensures that no matter how many times the same request is sent, the result stays the same. Think of it like an ATM that only processes one withdrawal even if the request is sent twice.
And the most popular article from the last issue was: