I need to write history only in several cases. Is it possible to disable or enable enverse at runtime? Something like this, for example:
using (new WriteHistory())
{
}
I need to write history only in several cases. Is it possible to disable
Share
As @Firo pointed out, inherit AuditEventListener (which contains the event listeners) and override OnPostInsert, OnPostUpdate, OnPostDelete, OnPreUpdateCollection, OnPreRemoveCollection and OnPostRecreateCollection. In these methods, look if X is fulfilled – if it is, call the base impl. If not, do nothing. Your AuditEventListener impl you pass into the IntegrationWithEnvers method.