I'm trying to create an auditor to keep the changes of field value, by comparing field DbValue and CurrentValue. If they are different, I tread it as changed and store both value into auditor trail log.
I work fine for new inserted entity, I can trace all the fields that user edited only and store them into the log. However, my design does not work for entity updating, I found that AuditorBase.AuditUpdateOfExistingEntity() is executed after SaveEntity(), and entity is refetched after saving, all the DbValue and CurrentValue are the same.
How can I get the entity before save in AuditorBase.AuditUpdateOfExistingEntity()?
Thank you!!!