How to add a SaveOrUpdateCopy event listener to NHibernate

How to add an event listener for SaveOrUpdateCopy in NHibernate? I see that the ListenerType enumeration does not have the type "SaveOrUpdateCopy". I tried using the "Merge" type, but this adds this to the MergeEventListeners collection. SaveOrUpdateCopy raises events from the SaveOrUpdateCopyEventListeners collection.

How to add event class to SaveOrUpdateCopyEventListeners collection in NHibernate?

+4
source share
1 answer

In our project:

listeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { new TrackChangeFlushEntityEventListener(), new DefaultSaveOrUpdateEventListener() }; 

works for SaveOrUpdateCopy

+1
source

Source: https://habr.com/ru/post/1307586/


All Articles