Skip to content

feat: add domain event (v.1.2.0)#1

Merged
berk2k merged 1 commit intomainfrom
feature/domain-events
Sep 25, 2025
Merged

feat: add domain event (v.1.2.0)#1
berk2k merged 1 commit intomainfrom
feature/domain-events

Conversation

@berk2k
Copy link
Owner

@berk2k berk2k commented Sep 25, 2025

Summary

This PR introduces domain event support to FlowMediator.

Changes

  • Added IDomainEvent interface extending IRequest<Unit>.
  • Added Unit struct for void-like responses.
  • Introduced BaseEntity with domain event management (Add/Clear).
  • Updated mediator to handle domain events just like commands/queries.
  • Added console + unit tests demonstrating domain event publishing and handling.

Why

Domain events allow entities to raise and dispatch important business events
(e.g., AppointmentBookedEvent) in a clean, decoupled way.
This feature aligns FlowMediator with DDD best practices.

Version

This PR prepares the codebase for release v1.2.0.

@berk2k berk2k merged commit 755325f into main Sep 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant