RO EN
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
Persistence through EF Core in the Infrastructure Layer

Persistence through EF Core in the Infrastructure Layer

Separate the responsibility of data persistence in a clean way using EF Core and an abstracted context in the Infrastructure Layer.

Citește mai mult
Clear separation between ReadModel and DomainModel (optional)

Clear separation between ReadModel and DomainModel (optional)

Find out why it is important to separate domain models from read models in a DDD + CQRS application and how this helps you keep the code clear and performant.

Citește mai mult
Mapping with AutoMapper between DTO and Model in .NET

Mapping with AutoMapper between DTO and Model in .NET

Learn how to efficiently map between DTO and domain model using AutoMapper in ASP.NET, for clean API requests and responses.

Citește mai mult
Validation with FluentValidation on Commands in .NET (CreatePostCommandValidator)

Validation with FluentValidation on Commands in .NET (CreatePostCommandValidator)

How to efficiently validate orders in .NET using FluentValidation: clear rules for writing only, without affecting reading.

Citește mai mult