Closed ParsaMehdipour closed 5 months ago
Two reasons: 1) So I could have an example of a domain service 2) So I could show sending a domain event from a domain service
If there weren't the domain event it could easily have just been in the UseCases folder as a DeleteCommandHandler doing everything. And if you wanted to fire off domain events there, you could, but my preference is to keep them in the domain (as their name implies).
Thank you for your insightful response. I now comprehend the preferred approach as highlighted in the comments, emphasizing the maintenance of domain service logics in the core layer.