Moving data to another table after saving to NHibernate

I have a project in which I use NHibernate as an ORM in my repositories. But after some CQRS, I want to try and β€œcopy” some of my data into other tables to view the query / reporting. The point is, when, for example, a new client is created, I would like some of the information about the client and company to be copied to another table using some associations, only to request them later, without having to join and go all the way through some DTO and other layers, see CQRS :)

Now the problem is, how should I implement this? I can do some syncCustomer stored procedure for the call after my Create Client has completed, but is that so? [/ P>

How else can I do this?

+4
source share
1 answer

Paco is right, you should study the source of events and potentially use the messaging architecture to support this. Udi Dahan contains some great articles that really helped me better understand these concepts.

In fact, the last post concerns exactly this: http://www.udidahan.com/2009/12/09/clarified-cqrs/

+3
source

All Articles