RO EN
Abstract Factory – families of coherent objects, without concrete dependencies

Abstract Factory – families of coherent objects, without concrete dependencies

Explore Abstract Factory, an essential pattern in .NET software architecture, which allows the creation of families of compatible objects without depending on concrete classes. Ideal for complex, modular, and extensible applications.

Citește mai mult
Factory Method – flexible object creation without knowing the exact class

Factory Method – flexible object creation without knowing the exact class

Discover how the Factory Method works, one of the most useful object-oriented design patterns. Create instances flexibly, without depending on concrete classes — an essential approach in modern .NET and C# software architecture.

Citește mai mult
Singleton Pattern – control of unique instances in .NET

Singleton Pattern – control of unique instances in .NET

Singleton is one of the most popular design patterns in .NET, used to guarantee the existence of a single instance of a class. Discover how it works, when it is useful, and how to implement it correctly in C# through practical examples.

Citește mai mult
Introduction to Design Patterns – Why They Are Essential in .NET

Introduction to Design Patterns – Why They Are Essential in .NET

Design patterns are time-tested solutions for common software design problems. In this article, you will discover why they are essential in .NET and how they help you write cleaner, more extensible, and easier to maintain code.

Citește mai mult
CQRS + Event Sourcing, Scaling and Custom Command Bus

CQRS + Event Sourcing, Scaling and Custom Command Bus

The final stage in the CQRS series explores advanced concepts such as Event Sourcing, the physical separation of databases for reading and writing, and the implementation of a custom Command/Query Bus — ideal for enterprise projects and microservices.

Citește mai mult
Additional Extensions and Patterns in CQRS

Additional Extensions and Patterns in CQRS

This stage in the CQRS series explores advanced extensions such as decorators over MediatR, event publishing, and audit logging. Discover how you can add logging, retry, validation, domain events, and action tracking in a clean and scalable architecture.

Citește mai mult
Repository Design (optional) for writing

Repository Design (optional) for writing

In this article, we discuss designing a Repository for write operations as an alternative to working directly with DbContext. You will see how an IPostRepository with methods like AddAsync() and GetByIdAsync() can simplify the logic in Command Handlers and maintain a clear separation of responsibilities.

Citește mai mult
Applying transactions in the Command handler

Applying transactions in the Command handler

In this article, we explore how to manage transactions in the Command handler of a CQRS and DDD-based application. We will examine the use of IDbContextTransaction from Entity Framework Core and the UnitOfWork alternative to ensure data consistency when business logic involves multiple operations.

Citește mai mult