Sure thing. You should create an event listener (Google for "NHibernate audit event listener"). Possibly as IPreDeleteEventListener, IPreInsertEventListener and IPreUpdateEventListener.
Inside it add the raising of domain events as synchronization callbacks to the transaction. That way you can make the choice to raise or not, based on the success of the transaction commit. /G 2016-06-09 13:33 GMT+02:00 Mark Perry <[email protected]>: > Trying to achieve the following from this post: > https://lostechies.com/jimmybogard/2014/05/13/a-better-domain-events-pattern/ > > using NHibernate and right before I do my "tran.Commit()" I'd like to loop > over the entities in the UoW and fire off the domain events. > > Could someone let me know if this is possible in NH? > > Thanks, Mark > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/nhusers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
