David Pereira
1 min readFeb 8, 2021

--

Hi Casper!

Thank you for being interested in this template!

1. Yeah, imagine you are using an API, if anything is wrong is going to be reported back to the user. You can try to clone the repo, execute it and force an error to see how everything prompts as expected. At the end Mediator is not an event store, it is just an in-memory bus to decouple responsibilities. As I mentioned its usage depends on the use case, if you find that it adds complexity to your solution or you want to do it in a different way you can do it without any problem!

2. Yeah sure, that's a nice point and I will definetly add it to the template so we can write the events to be consumed if the application stops or crashes. It definetly deserves to be into account. I was thinking that once the Domain Event is raised and it goes to the DomainEventHandler and then you can do whatever you want with your event, like sending it to an event store. But I think that using the event store approach is something that can be great for the template, thanks!

It is pretty commn to use CQRS with Mediator, some people use MediatR library from Jimmy Bogard, I like FluentMediator from Ivan Paulovich as well and I find it really suitable for CQRS.

--

--

David Pereira
David Pereira

Written by David Pereira

.NET Core lover. Passionate about Software Architecture. Trying to learn every day.

No responses yet