Skip to main content

Newsletter Archive

Browse through our collection of past newsletters. Each edition is packed with C# and .NET insights.

Page 12 of 12 (36 editions)

January 16, 2026

C# 14 More Partial Members: Partial Events and Partial Constructors

C# 14 widens the "partial" bridge by letting you split instance constructors and events into defining and implementing declarations. The post unpacks the strict one-and-one pairing, why partial events are deliberately not field-like (custom add/remove only), and the real win for source generators clean separation of API surface from generated plumbing for weak events, interop, and bindings plus gotchas around lookup/metadata, signature matching, attributes, and docs.

Azure Cosmos DB vNext Emulator: Query and Observability Enhancements

Azure Cosmos DB's Linux-based vNext emulator gets a serious tune-up: a more capable query engine (nested/cross JOINs, string/array operators, cleaner subdocument handling) and first-class OpenTelemetry so you can trace, log, and grab metrics locally like production. The post shows practical queries, Docker Compose wiring for Jaeger/Prometheus, and health probes that pair nicely with Testcontainers handy for .NET devs validating complex data access patterns and CI pipelines without touching the cloud.

Enterprise Patterns for ASP.NET Core Minimal API: Identity Map Pattern

Chris Woodruff demystifies the Identity Map for ASP.NET Core Minimal APIs with the rule of thumb: one database row, one in-memory object. He shows how EF Core's DbContext already provides this behavior, why multiple DbContexts and AsNoTracking can cause subtle lost-update bugs, and walks through a before/after refactor that aligns Identity Map with a Unit of Work. For non-tracking data access, he includes a lightweight C# identity map and a Dapper-friendly unit of work to keep your customer from turning into three people during a single request.

The Practical Series Every .NET Developer Needs Before Building Real Backends (Part 1)

This practical series makes backend dev feel less like framework wizardry and more like solid C#: it starts by contrasting .NET Framework vs .NET Core, then digs into production-grade fundamentals OOP in the real world, delegates/events/lambdas, extension methods, generics, and LINQ. Part 1 lays out the roadmap with bite-size explainers and tees up performance-minded topics next (EF Core + LINQ, async/await, GC) so your services behave predictably when traffic and data grow.

What is Redis and how does it fit into Clean Architecture in a .NET application

This guide demystifies Redis for .NET devs covering its in-memory speed, data structures, persistence, pub/sub, TTLs, and clustering with practical StackExchange.Redis snippets. The real value is architectural: wire Redis into Clean Architecture by putting it in Infrastructure behind an ICacheService and keeping controllers blissfully unaware. Round it out with production-minded tips like TTLs, payload limits, a singleton ConnectionMultiplexer, and Azure Redis to shave load off your database and keep things snappy.

3x Faster, 99.9% Less Memory: Optimizing .NET String Processing

By replacing string.Split with ReadOnlySpan slicing and a small ref struct, this log parser goes 3x faster while allocating just 470 bytes on 100k lines GC basically takes a coffee break. It's a practical tour of zero-allocation string processing in .NET, showing how spans and stack-friendly types tame memory churn in real-world workloads.

Don't miss the next tip 💧

Get a .NET tip and curated links delivered to your inbox every week.

.NET 10 and ASP.NET Core: Refinements That Matter in Production

A tour of ASP.NET Core in .NET 10 that focuses on production-ready refinements: passwordless Identity with passkeys, richer built-in OpenTelemetry metrics, smarter memory behavior for long-running services, and thoughtful polish across Minimal APIs, OpenAPI, and Blazor. With concrete snippets (passkey setup, SSE streaming, YAML OpenAPI, reusable validation), it leans into "simple by default, extensible when needed" ergonomics while tightening security and observability. If your APIs hum 24/7 or your Blazor app has grown up, this is less yak‑shaving and more shipping.

Handling Time Zones & Dates Correctly in .NET

Time zones look easy until your nightly job runs an hour early and users see "future" timestamps. This .NET explainer shows why offsets, DST, and historical rule changes make date-time tricky, and lays down the golden rule: store and transmit UTC, convert to local time only at the edges (like the UI). A practical primer to keep data consistent across systems and your users' clocks sane.

Understanding SQL and NoSQL Distributed Transaction Problem in C# — Transactional Outbox Pattern

Recep Serit breaks down why mixing SQL Server and NoSQL in a single TransactionScope doesn't fly in .NET NoSQL drivers skip MSDTC/2PC, turning dual-writes into a consistency trap. He demonstrates the Transactional Outbox pattern with EF Core: commit your change and an Outbox row atomically, then let a background worker forward to NoSQL or a broker for at-least-once, eventual consistency. A practical, beard-friendly blueprint for polyglot persistence without distributed transaction drama.

Type-Safe Collections in C#: How NonEmptyList Eliminates Runtime Exceptions

Empty collections sneaking into your business logic? This explainer introduces NonEmptyList for .NET 6/8 a type-safe collection that guarantees at least one element then walks through head/tail deconstruction, Map/FlatMap, seedless Reduce, async/parallel helpers, an immutable variant, and serialization/EF Core integration. A realistic order-processing pipeline shows how moving "non-empty" into your types shifts failures to the compiler and keeps your LINQ honest.

TDD in .NET: Refactoring Safely

Ajay Kumar shows how TDD makes refactoring in .NET feel safe, turning 300-line if-fests into small, testable pieces. Through clear C# examples extracting a DiscountCalculator, introducing shipping strategies, and writing characterization tests he leans on Red-Green-Refactor, practical patterns, and tools like Stryker.NET to prevent regressions. A friendly, test-first playbook for trimming duplication and fixing bugs once across your codebase.

EF Core 10 Introduced LeftJoin and RightJoin

EF Core 10 adds LeftJoin and RightJoin LINQ operators, letting you express joins with far less ceremony than the old GroupJoin + DefaultIfEmpty + SelectMany pattern. The post shows the before-and-after code along with the SQL EF generates, making the readability and correctness gains crystal clear. A tidy quality-of-life upgrade for anyone tired of re-remembering left-join gymnastics in LINQ.

January 14, 2026

Does C# 14’s field Keyword Replace FluentValidation?

A crisp walkthrough of C# 14’s field keyword and why it doesn’t replace FluentValidation. Field streamlines property-level invariants by letting you set the compiler-generated backing field directly, while FluentValidation remains the go-to for contextual, cross-property, user-friendly input rules at application boundaries. The upshot is a layered approach: field for safeguarding domain integrity, FluentValidation for rich input validation.

Rock Your Code: Code & App Performance for Microsoft .NET (5th Edition)

David McCarter’s Rock Your Code: Code & App Performance for Microsoft .NET (5th ed.) is a hands-on, benchmark-driven guide to writing fast, scalable C# for .NET 10 and beyond. It dives into real-world patterns for memory, collections, LINQ, strings, I/O, and more plus analyzers, caching, logging, serialization, source generators, and the Spargine library balancing runtime speed with cloud cost. A companion to his coding standards book, it helps you think like a performance engineer from the first line of code.

The Complete Guide to C# .NET Input Controls

Ever wrestled with phone-number masks, culture-aware numbers, or a dropdown that needs to be searchable? This guide surveys C#/.NET input controls text, masked, numeric, date/time, and selection then shows how ComponentOne’s editors (C1TextBox, C1MaskedTextBox, C1NumericBox, C1DateRangePicker, C1MultiSelect, etc.) bring validation, formatting, and localization together across WinForms, WPF, ASP.NET Core, Blazor, WinUI, and .NET MAUI. It’s a practical look at when to stick with native widgets versus reaching for richer controls to cut boilerplate and keep behavior consistent.

Channels in C# .NET: Building High-Performance Concurrent Pipelines

A friendly primer on System.Threading.Channels shows how to build high-throughput, async pipelines in .NET without drowning in locks and polling. It contrasts Channels with ConcurrentQueue and manual synchronization, highlights bounded channels for built‑in backpressure, and walks through producer/consumer patterns using ChannelWriter/Reader, await foreach, and graceful completion. You’ll also get practical use cases, best practices, and context on why ASP.NET Core leans on Channels for predictable performance under load.

TDD in .NET: Practicing TDD in a Web API Project

Ajay Kumar walks through a pragmatic, layered TDD approach for a .NET Web API by building a “get expenses by category” endpoint in an Expense Manager app. He splits responsibilities across controller, service, and repository, using Moq and in-memory fakes to keep tests fast, DTOs to protect boundaries, and the red–green–refactor loop to guide design. It’s a clear blueprint for what to test, what to mock, and how to keep your API thin, tidy, and change‑friendly.

The C# ‘Best Practice’ that is secretly killing your API performance

A cautionary tale for clean-code fans: spinning up a new HttpClient in a using block per request can quietly trigger socket exhaustion under load thanks to TIME_WAIT. The author recounts a real production outage at an event check-in system and shows how IHttpClientFactory, named clients, and DI-backed connection pooling fix it with reused sockets and sensible timeouts. A crisp reminder that HttpClient is special and how to keep high-throughput .NET APIs from melting their ephemeral ports.

Don't miss the next tip 💧

Get a .NET tip and curated links delivered to your inbox every week.

Practical JWT Mastery in .NET

Part 4 of a practical JWT-in-.NET series strips the mystery from signatures covering hash basics, HMAC (HS256), and why symmetric keys can bite you in microservices. It contrasts RSA/ECDSA’s private/public split, introduces JWKS for safe rotation and discovery, previews verification in code, and tees up how a validated token becomes HttpContext.User reminding us that strong, well-guarded keys (not algorithm glitter) keep your APIs honest.

The 10 Most Interesting C# Bugs We Found in Open Source in 2025

Static-analysis sleuthing meets real-world C# in a roundup of ten noteworthy bugs uncovered across open-source projects in 2025. Rather than just gawking at glitches, it teases out the patterns behind them and how analyzers and better idioms can catch issues earlier handy guardrails for your day-to-day .NET work. A light, practical tour of pitfalls that quietly ship to prod and the habits that keep them from tagging along.

.NET 10 & C# 14: Less Code, Better Performance

.NET 10 and C# 14 get a down-to-earth walkthrough aimed at everyday dev pain points less boilerplate, more zip. On the C# side you’ll see chained ??= for deep object graphs, a new field keyword to safely work with auto-property backing fields, and ref/out/in-friendly lambdas for zero-copy hot paths. Platform-wise, it highlights cleaner left-join patterns and JSON partial updates in EF Core, built-in validation for minimal APIs, and friendlier quick-script workflows practical wins from CRUD to performance-heavy code.

Enable Modern Run dialog box in Windows 11

Windows 11 Insider builds are rolling out a modernized Win+R Run dialog, and this walkthrough shows how to enable it either via a Settings toggle or a quick registry edit, then restart Explorer). Targeting recent Dev/Beta previews like build 26220, it’s a small but welcome quality-of-life tweak for developers who live in Win+R to launch tools, scripts, and system commands.

Getting Started with Microsoft Agent Framework

A friendly, code-first tour of Microsoft Agent Framework (MAF) positioned as the successor to Semantic Kernel showing how to build C# agents with tool/function calling, strongly-typed structured outputs, and durable threads without playing framework roulette. It also covers RAG with a vector store and TextSearchProvider plus Azure AI Foundry’s managed agents, illustrating how MAF blends SK’s integrations with AutoGen-style orchestration to take you from local experiments to production.

Background Jobs in .NET: Hangfire, Quartz, Temporal in 2026

A clear, real-world guide to background work in .NET 9+, comparing BackgroundService, Hangfire, Quartz.NET, and Temporal what each does well, how retries with exponential backoff are handled, and how to wire up monitoring and tracing with OpenTelemetry. It includes concise C# examples and a pragmatic decision map to know when a simple hosted service will do, when you need a scheduler and dashboard, and when your flows call for a durable workflow engine in 2026.

January 12, 2026

Create and Read JWT Tokens in C# .NET

A quick, code-first walkthrough of creating and reading JWTs in C# using System.IdentityModel.Tokens.Jwt covering claim selection, HMAC-SHA256 signing, and parsing token headers/claims without validation. It emphasizes real-world guardrails (JWTs are readable, validate on the backend, set expirations, and prefer certificates over shared secrets) and points toward production patterns like refresh tokens and role-based authorization. A tidy primer whether you’re prototyping an auth flow or tightening up an API.

How to generate Code Coverage for a .NET Solution

David Guida walks through wiring up Coverlet to generate solution‑wide code coverage in .NET, including a GitHub Actions pipeline that merges results across test projects, outputs both JSON and OpenCover, and drives a README badge. He also covers the real-world gotchas: running tests sequentially (-m:1) to avoid cross-project contamination and excluding test assemblies via a .runsettings file so your numbers actually mean something. A tidy, copy‑pasteable setup to keep your .NET 8 codebase honest without a build-pipeline yak shave.

Azure Cost Estimation: Your Strategic Guide to Cloud Pricing

Azure Essentials tackles unpredictable cloud bills with a practical, three-layer approach to estimating Azure costs architecture, configuration, and usage so your .NET workloads don’t surprise the finance team. Thomas Maurer and Britt walk through modeling scenarios with the Azure Pricing Calculator and Azure Migrate, then show how Azure Advisor, Cost Management, Copilot in Azure, and Monitor help refine and optimize over time. A clear, developer-friendly blueprint for turning “it depends” into numbers you can plan around.

C# 14 in Action: High-Performance Lambda Expressions with Parameter Modifiers

C# Corner breaks down how C# 14 levels up lambdas with parameter modifiers (ref, in, out), pushing them closer to full method parity for clearer intent and faster paths in real-world code. Through scenarios like hot-loop updates, large-struct reads, Try-parse patterns, and buffer processing, it shows how these enhancements trim boilerplate, improve API design, and keep performance-sensitive code as readable as your favorite LINQ.

7 Mistakes .NET Developers Should Avoid

This concise guide calls out seven career-slowing pitfalls for .NET devs and offers practical upgrades: move from .NET Framework to .NET 6/7/8 and ASP.NET Core, write cleaner SOLID code, practice C# problem-solving, and get comfortable with Azure, Docker, Git, and CI/CD. It also reminds us that communication, documentation, and tests aren’t extras they’re how you ship confidently. A friendly gut-check for keeping skills sharp and relevant.

Digital Essentialism in .NET: How Verdict is Redefining the Result Pattern

Meet Verdict, a ‘digital essentialism’ take on the Result pattern for .NET that uses a readonly struct to keep the happy path allocation-free backed by eye-popping benchmarks (e.g., 189x faster than FluentResults) and far less GC pressure. It pairs the lean core with opt-in goodies like ASP.NET Core ProblemDetails mapping, LoggerMessage-based logging, async chaining, and multi-error validation handy for APIs and microservices chasing lower latency and lower cloud costs.

Don't miss the next tip 💧

Get a .NET tip and curated links delivered to your inbox every week.

Partial Events and Constructors in C# 14 (.NET 10) Explained with Examples

C# 14 (on .NET 10) introduces partial constructors and partial events, finally letting you split initialization and event accessors across files so source-generated and hand-written code play nicely together. The article walks through practical patterns init hooks, customizable add/remove accessors, and generator-friendly APIs plus gotchas, best practices, and why there’s no runtime cost. A tidy upgrade for anyone juggling source generators, ORMs, or UI frameworks who wants cleaner seams and fewer merge headaches.

Hybrid Cache & Output Caching in .NET: A Game Changer for High-Performance Applications

A friendly walkthrough of Hybrid Cache and Output Caching in modern ASP.NET Core, showing how Hybrid Cache marries IMemoryCache speed with distributed stores (like Redis) behind a single, resilient API while Output Caching serves full HTTP responses instantly. With clear code snippets and a realistic e‑commerce scenario, it highlights when these patterns shine (and when they don’t) and the kind of gains you can expect think ~300ms down to ~20ms and far fewer DB hits on read‑heavy endpoints. Less cache plumbing, more throughput.

SQL Server Regular Expression Performance and Guidelines

SQL Server 2025 brings native regex functions to T‑SQL (compat level 170), and Ben Johnston road-tests them with practical, real-world guidance. The headline: REGEXP_REPLACE is often a big win that simplifies gnarly text cleanup, but REGEXP_LIKE can be 10–50x slower than LIKE on big tables and tends to scan rather than seek so filter first and test, especially with Unicode. He maps each regex function to its legacy counterpart, showing where they shine (imports/parsing) and when the old standbys are still the better choice.

Changing Immutable Collections

Jon Skeet explains why, for build-once/read-many workloads, FrozenDictionary and ImmutableArray can beat ImmutableDictionary and ImmutableList and shows the usage patterns that make the difference. He details a mostly drop-in migration (new namespace, Count→Length, value-type nullability tricks with .Value or pattern matching) and the real-world gotchas. The payoff: read-heavy validation fell from ~5.5ms to ~0.826ms, with some naming nitpicks and value-type awkwardness as the only lingering gripes.

What’s New with APIs in .NET 10: Taking a Look at Real Improvements

Dave Brock walks through .NET 10 and C# 14 from an API developer’s seat, using a tidy order-management API to show why the changes matter in practice. Highlights include built-in Minimal API validation with ProblemDetails, OpenAPI 3.1 (including YAML endpoints), SSE support, and EF Core 10’s named query filters for safer multi-tenant data plus C# 14’s field keyword, null-conditional assignments, and extension members to trim boilerplate. A practical, no-drama tour of upgrades that make APIs cleaner, better documented, and easier to evolve.

C# Smart Enums: advanced

Part 3 of the Smart Enums series shows how to end the copy‑paste parade by moving enum lookup logic into a generic base class that uses the CRTP pattern. With a per‑type static dictionary, Initialize() to skip reflection, and Get/GetOrDefault/TryGet APIs, you get O(1) lookups, strict type safety, and zero boilerplate perfect when your app juggles lots of status types. Tested on .NET 6, with references to generics constraints and Ardalis.SmartEnum for production‑grade inspiration.