Design Patterns
Explore design patterns topics and best practices in the .NET ecosystem.
Simple Messaging in .NET with Redis Pub/Sub: A Beginner's Guide
Learn Redis Pub/Sub in .NET with StackExchange.Redis using simple words, a real-life analogy, clean async C# code, diagrams, and when to use it safely.
Refactoring a Modular Monolith Without MediatR in .NET
Learn to remove MediatR from a .NET modular monolith using plain handlers and a tiny dispatcher, with CQRS, pipeline behaviors, and clear module boundaries.
CQRS Pattern with MediatR in .NET: A Friendly Guide
Learn the CQRS pattern with MediatR in .NET using simple words, clear diagrams, and real C# code. Beginner friendly, with pitfalls and licensing notes.
Lightweight In-Memory Message Bus Using .NET Channels
Build a fast, thread-safe in-memory message bus in .NET using System.Threading.Channels, with a friendly pub/sub design, full code, and the safety warnings you need.
Scaling the Outbox Pattern in .NET: From Hundreds to Billions of Messages
Scale the Outbox Pattern in .NET to billions of messages a day with batching, indexes, SKIP LOCKED, and parallel workers — explained simply with diagrams.
CQRS Pattern in .NET: The Way It Should Have Been From the Start
A friendly, hands-on guide to the CQRS pattern in .NET 10. Learn commands, queries, handlers, diagrams, and when to actually use it.
Specification Pattern in EF Core: Flexible Data Access Without Repositories
Learn the Specification pattern in EF Core to build reusable, testable, composable queries without piling up repository methods or hiding IQueryable.
Building a Better MediatR Publisher With Channels (and Why You Shouldn't)
Build a custom MediatR INotificationPublisher using System.Threading.Channels for background events in .NET, then learn why a queue this simple can quietly lose your data.
Using MassTransit with RabbitMQ and Azure Service Bus in .NET
Learn how MassTransit lets one set of .NET code run on both RabbitMQ and Azure Service Bus, with simple consumers, publishers, and config examples.
Event-Driven Microservices with Azure Service Bus in .NET
A friendly, step-by-step guide to building event-driven microservices in .NET using Azure Service Bus topics, subscriptions, and the ServiceBusProcessor.
Implementing the Saga Pattern With Wolverine in .NET
Learn the saga pattern in .NET with Wolverine: stateful sagas, Start and Handle methods, timeouts, and compensation. Simple words, examples, and diagrams.
CQRS Validation with MediatR Pipeline and FluentValidation in .NET
Learn centralized CQRS validation in .NET using a MediatR pipeline behavior and FluentValidation. Simple words, clear diagrams, and real C# code.
When Your Use Case Half-Succeeds: Designing for Partial Failure in .NET
Learn how to design .NET use cases that survive partial failure using outbox, saga, idempotency and compensation patterns, explained simply.
Messaging Made Easy with Azure Service Bus
A simple, friendly guide to Azure Service Bus messaging in .NET — queues, topics, dead-letter queues, sessions, and clean producer and consumer code.
Decorator Pattern in ASP.NET Core: A Friendly Guide
Learn the Decorator pattern in ASP.NET Core with simple examples, Scrutor, caching and logging decorators, and clear diagrams for beginners.
Implementing the Saga Pattern with Rebus and RabbitMQ in .NET
Learn the Saga pattern in .NET using Rebus and RabbitMQ with simple real-life examples, diagrams, correlation, compensation, and full C# code you can copy.
The Result Pattern in .NET: Error Handling Without Exceptions
Learn the Result pattern in .NET for clean, explicit error handling. Replace hidden exceptions with type-safe return values using simple examples, railway-oriented diagrams, code, and clear advice on when to use it.
How to Replace Exceptions with the Result Pattern in .NET
Learn how to replace exceptions with the Result pattern in .NET for clearer, faster, and safer error handling. Simple guide with C# examples.
How to Publish MediatR Notifications in Parallel in .NET
Learn how to publish MediatR notifications in parallel using a custom INotificationPublisher in .NET, with Task.WhenAll, error handling, and clear examples.
Implementing the Saga Pattern with MassTransit in .NET
Learn the Saga pattern in .NET with MassTransit state machines — states, events, correlation, persistence, retries, and compensation, explained in simple, friendly steps.
Stop Conflating CQRS and MediatR: They Are Not the Same Thing
CQRS and MediatR are two different ideas. Learn what each one really does, why people mix them up, and how to use CQRS in .NET with or without MediatR.
Implementing Idempotent REST APIs in ASP.NET Core
Learn to build idempotent REST APIs in ASP.NET Core with idempotency keys, an endpoint filter, and a safe store so retried requests never run twice.
MassTransit Outbox Pattern with EF Core and MongoDB in .NET
Learn the transactional outbox pattern in .NET using MassTransit with EF Core and MongoDB so your database and message broker never fall out of sync.
The Inbox Pattern in .NET: Handle Each Message Exactly Once
Learn the Inbox Pattern in .NET to stop duplicate messages from causing double charges and double emails. Simple real-life examples, EF Core code, diagrams, and how it pairs with the Outbox Pattern.
How to Use Domain Events to Build Loosely Coupled Systems in .NET
Learn how domain events keep .NET code loosely coupled. A simple analogy, full C# examples, diagrams, timing tips, and common mistakes explained for beginners.
Getting Started with Event Sourcing in .NET with Marten and PostgreSQL
Learn event sourcing in .NET using Marten and PostgreSQL. Store events, build aggregates and projections, and read state the easy, beginner-friendly way.
The Idempotent Consumer Pattern in .NET (And Why You Need It)
A friendly .NET guide to the idempotent consumer pattern: stop duplicate messages from double-charging customers using message ids, transactions, and EF Core.
Event-Driven Architecture in .NET with RabbitMQ: A Beginner's Guide
Learn event-driven architecture in .NET with RabbitMQ using simple words, real-life examples, exchanges, queues, and clean async C# code you can copy.
Message Ordering in .NET, Solved From First Principles
Learn message ordering in .NET from scratch: why messages arrive out of order, and how partition keys, sessions, and single consumers fix it.
Orchestration vs Choreography in .NET: A Friendly Guide
Orchestration vs choreography explained simply for .NET developers — events, commands, sagas, trade-offs, and when to pick each, with clear C# examples.
Building a Custom Domain Events Dispatcher in .NET (No MediatR Needed)
Build your own domain events dispatcher in .NET with EF Core. Simple analogy, full C# code, diagrams, and timing tips — no paid MediatR license required.
Implementing the Unit of Work Pattern in EF Core
Learn the Unit of Work pattern in EF Core with simple C# examples, diagrams, transactions, and when DbContext alone is already enough for you.
MassTransit with RabbitMQ and Azure Service Bus: Is It Worth a Commercial License?
MassTransit went commercial in v9. See how it works with RabbitMQ and Azure Service Bus, what the new license costs, and whether it is worth paying for.
The Outbox Pattern in .NET: Never Lose a Message Again
Learn the Outbox Pattern in .NET with simple, real-life examples. Save your data and your messages in one transaction so a broker outage can never lose an event. Includes EF Core code, diagrams, and best practices.
MediatR and MassTransit Going Commercial: What This Means for You
MediatR and MassTransit are now commercially licensed. Learn what changed, who pays, who stays free, and how to plan your .NET project calmly.
Getting Started With NServiceBus in .NET: A Beginner's Guide
Learn NServiceBus in .NET from scratch: endpoints, commands, events, handlers, retries, and pub-sub. Simple words, real-life examples, code, and diagrams.
Request-Response Messaging Pattern With MassTransit in .NET
Learn the request-response messaging pattern with MassTransit in .NET using IRequestClient, timeouts, and multiple response types with simple examples.
The Repository Pattern in .NET: A Friendly, Complete Guide
Learn the Repository Pattern in .NET with simple real-life examples, EF Core code, diagrams, and honest advice on when to use it and when to skip it.
Idempotent Consumer: Handling Duplicate Messages in .NET
Learn the Idempotent Consumer pattern in .NET to safely handle duplicate messages, prevent double charges, and build reliable message-driven systems.
Complete Guide to Amazon SQS and Amazon SNS with MassTransit
A friendly, step-by-step guide to messaging in .NET using Amazon SQS, Amazon SNS, and MassTransit — queues, topics, consumers, retries, and dead-letter handling.
Outbox Pattern for Reliable Microservices Messaging in .NET
Learn the Outbox Pattern in .NET to stop losing messages between microservices. Simple analogy, EF Core code, diagrams, and best practices for reliable messaging.
Event Sourcing for .NET Developers: A Simple Introduction
Learn event sourcing in .NET from scratch. Store every change as an event instead of just the current state, with a real-life bank-passbook analogy, diagrams, code, aggregates, projections, and when to use it.