How to Use the Transactional Outbox Pattern in .NET to Avoid Lost Messages
Learn how to implement the transactional outbox pattern in .NET with Entity Framework Core to reliably save business data and publish events without lost messages.
Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
Learn how to implement the transactional outbox pattern in .NET with Entity Framework Core to reliably save business data and publish events without lost messages.
Learn how to implement the transactional outbox pattern in .NET to keep database changes and broker messages consistent, including background processing, retries, and duplicate delivery.
Learn why a naive C# singleton can fail under concurrent access and how to implement thread-safe initialization with locks, Lazy, or dependency injection.
Why a simple two-step database saves, sharing one connection and transaction, is a genuine instance of the Unit of Work pattern - even without a dedicated class or explicit naming
Learn how to accurately identify Repository and Template Method patterns in C# by examining real enterprise .NET code and avoiding misleading pattern labels.
Learn how a 2-layer Controller and Data Access architecture applies OOP principles like abstraction and encapsulation while keeping enterprise applications maintainable.
Learn OOP concepts in C# with a practical HR and Payroll leave approval example covering classes, objects, abstraction, encapsulation, inheritance, polymorphism, and interfaces.
Learn how to identify SRP and OCP violations in C# using an Account example, and improve the design with polymorphism and the Strategy Pattern.
Learn Dependency Injection with Unity Container! This tutorial covers DIP, IoC, and DI implementation using the Microsoft Unity Framework with a practical example. Improve code testability!
Unlock scalable enterprise architectures with the Backend for Frontend (BFF) pattern in C#. Optimize performance, security, and client experience.
Database triggers harm enterprise apps by obscuring logic, hindering testing, and causing performance issues. Explore safer alternatives.
Learn the Simple Factory Pattern: a foundational design pattern for object creation, enhancing maintainability and abstraction in your code.
Understand DbContext lifetimes, singleton/scoped injection issues, caching pitfalls, API performance bottlenecks, and async scalability benefits.
Master SOLID principles in C#: SRP, OCP, LSP, ISP, DIP. Learn to write clean, maintainable, and scalable object-oriented code.
Learn how the Factory Pattern in C# encapsulates object creation, reduces coupling, supports runtime implementation selection, and improves extensibility and testability.
Demystify IoC, DIP, and Dependency Injection. Understand their purpose, differences, and how they work together with a clear mobile phone example.
Replace polling with Rebus deferred messages for efficient .NET background processing. Schedule tasks precisely and improve observability.
Learn how Apache Flink enables real-time stream processing, event-driven applications, stateful computations, and scalable analytics for modern data platforms.
Cilium Service Mesh offers a sidecar-free approach to Kubernetes networking, leveraging eBPF for efficient service discovery, security, and observability.
Design idempotent consumers for event-driven AI systems to prevent duplicate LLM calls, API triggers, and state corruption with LangGraph.
BFF pattern: a dedicated backend for each frontend. Solves microservice data needs for diverse clients, improving performance & independence.
Master the DRY principle in C#: avoid duplicating knowledge, not just code. Learn practical examples and common pitfalls for robust software.
Learn the Dependency Inversion Principle (DIP) in C#. Discover why high-level business logic shouldn't depend on low-level implementation details, and how to invert that dependency using abstractions.
Explore Event Sourcing in .NET: store business events, not just current state. Learn patterns for audit trails, time travel, and complex workflows.
Master high-frequency PCB design for optimal signal integrity! Explore materials, layout, and EM simulation techniques for superior performance in RF applications.
Explore the key differences between metric and standard measurement systems. Understand their origins, units, consistency, and global usage for accuracy.
Explore the Sidecar Pattern for microservices! Learn how it offloads cross-cutting concerns like logging and security, boosting modularity and scalability. A must-know for cloud-native architectures.
Explore Creational Design Patterns! Learn how to decouple object creation, improve flexibility, and enhance testability in your .NET and C# applications. #designpatterns
Master the Builder Pattern in C# for elegant object creation! Simplify complex object construction with step-by-step implementation and improve code maintainability.
Explore system design patterns like load balancing, caching, and microservices for building scalable applications. Learn how to handle high traffic and ensure reliability.
Everything on Design Patterns & Practices, not only its articles: the Design Patterns & Practices page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article