#580 – October 26, 2025
stop creating additional layer of complexity
Why you don't need a repository in EF Core
16 minutes by Anton Martyniuk
Developers often wrap EF Core in repository interfaces, but this creates unnecessary complexity. EF Core's DbContext already acts as a repository with each DbSet representing entity collections. Adding another repository layer leads to bloated code, maintenance overhead, and over-engineering. Instead, inject DbContext directly into services and use extension methods for reusable queries.
What the Fastest Growing SaaS Companies Use for Enterprise Identity
sponsored by WorkOS
Enterprise customers demand SSO, directory sync, granular permissions, and audit logs built to strict compliance standards. Building them in-house takes months and creates ongoing maintenance that pulls focus from your core product. WorkOS lets teams ship these features fast with clean APIs, streamlined customer onboarding, and built-in SOC 2 and GDPR support. Trusted by OpenAI, Cursor, and Vercel.
The field keyword
3 minutes by Thomas Claudius Huber
C# 14 introduces the field keyword that lets you access the auto-generated backing field of properties. This fills the gap between simple auto properties and full properties with explicit backing fields. You can now add custom logic to property setters while keeping the concise auto property syntax. This is especially useful for ViewModel properties that need to raise PropertyChanged events.
Using profiler function hooks in .NET with Silhouette
8 minutes by Kevin Gosse
Silhouette is a .NET library that lets developers write profilers in C#. Kevin solved a key challenge: implementing function hooks that track when methods start and stop executing. This required creating assembly stubs in C++ that save CPU registers and forward calls to managed C# code.
Introducing Isolator: A framework for running isolated code for .NET
6 minutes by Ricardo Peres
Code isolation lets developers run untrusted code safely without affecting the main program. .NET Core removed app domains, which made this harder to achieve. The new Isolator framework offers two solutions: running code in separate processes or using assembly load contexts. Isolator allows plugins to execute with parameters and return results while capturing output streams.
How to use a scoped service inside a hosted service in .NET
7 minutes by Yohan Malshika
Hosted services in .NET are singletons that run background tasks, but they can't directly use scoped services like database contexts or repositories. This creates a dependency injection conflict. The solution is to inject IServiceScopeFactory into the hosted service and create a new scope each time you need scoped services. This ensures proper cleanup and prevents memory leaks while allowing safe access to database operations and other scoped dependencies.
And the most popular article from the last issue was: