Yegor Sychev’s .NET Blog
Articles, guides, and thoughts on building real-world systems.
Dapper vs EF Core: A Practical Performance Comparison in .NET
A practical benchmark of Dapper and EF Core in .NET using PostgreSQL, BenchmarkDotNet, realistic reads, joins, updates, parallel queries, and allocation analysis.
Building a Database in a Text File — Fewer Allocations with Span<T>
Post 4 of the Advanced C# for Your Next Interview series: switching file storage to append-only NDJSON and using Span<T> to reduce avoidable allocations.
Synchronization Primitives in .NET: User Mode, Kernel Mode, and Thread Affinity
Post 3 of the Advanced C# for Your Next Interview series: how .NET synchronization primitives differ in waiting cost, ownership, thread affinity, and async support.
Fixing the Race Condition - SemaphoreSlim in Action
Post 2 of the Advanced C# for Your Next Interview series: fixing a read-modify-write race condition with SemaphoreSlim.
Building a Database in a Text File — Why Async Is Not Enough
Post 1 of the Advanced C# for Your Next Interview series: building a simple file-based storage and discovering why async alone does not make code safe under load.
Strangler Fig Pattern: Step-by-step Migration from Legacy MVC to .NET Core
Learn how to migrate a legacy ASP.NET MVC application to ASP.NET Core gradually and safely with the Strangler Fig pattern.
Little-Known Facts from the History of C# You Should Know
Explore key moments in C# history, from Anders Hejlsberg and the Comega research project to LINQ, async/await, and the language's wider influence.
Proactive configuration validation in .NET: prevent errors before they happen
Validate appsettings at startup with DataAnnotations and .ValidateOnStart() to fail fast and avoid hidden bugs.
Feature Flags in .NET with IFeatureManager
Learn how to manage feature flags in .NET with IFeatureManager and change application behavior through configuration.
How Clean Architecture Differs From Layered
How Clean Architecture Differs From Layered
A Practical Guide to WarningsAsErrors
Learn how to treat .NET compiler warnings as errors globally or selectively and adopt stricter builds gradually.
Hooking Your MCP Server into GitHub Copilot
Hooking Your MCP Server into GitHub Copilot
How to Add Unit Tests to a Legacy Project
A lightweight approach to adding unit tests to legacy code without rewriting the entire application.
Optimizing Nullable Annotations with [NotNullWhen(true)]
Use NotNullWhen and other nullable analysis attributes to express method contracts and eliminate unnecessary C# warnings.
NASA's Critical Lessons on Cyclomatic Complexity: Why Simple Code Saves Lives
What NASA learned about cyclomatic complexity, test effort, MC/DC coverage, and keeping safety-critical software manageable.
Architecture I Use in My Projects: Continuation
Architecture I Use in My Projects: Continuation
Architecture I Use in My Projects
In this post I want to share the application architecture I use in real-world projects, an approach that has proven itself in practice.
Using Different CORS Policies for Endpoints in ASP.NET
Using Different CORS Policies for Endpoints in ASP.NET
How to Clean Up Package Dependencies in Projects?
Learn why removing unused NuGet references can break a .NET build and how to fix misplaced and transitive package dependencies.
How to effectively implement Clean Code practices in a team?
How to effectively implement Clean Code practices in a team?
How to Use ADRs Without Turning Them into Bureaucracy
Keep Architecture Decision Records useful and lightweight with a practical format that preserves context without creating unnecessary bureaucracy.
Mocking HttpClient in C#
Learn how to mock HttpClient in C# unit tests without external HTTP mocking dependencies.