Looking at all the possibilites of creation / update columns in NHibernate I mostly (Stackoverflow question, Ayende Rahien) see solutions with Listeners.
The programmer who was programming this in my company used an Interceptor to achieve the same thing.
Is there any difference between those two solutions? (Is one of them obsolete, is one of them preferred and what are the advantages and / or disadvantages)
Interceptors are the the old way, event-listeners are newer and server the same purpose. So in a new project, event-listeners are recommended. You hook up to the new NHibernate event system.
Edit: As Rashack mentions in his comment, there are some operations that can only be done using the interceptor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With