Reuse entitychanges logic to insert in other audit database
I'm using a template solution on abp 2.9 EF core and added one project to handle mongo repository, so same app is using both, sql server and mongo. I need to record the entity changes to a custom table (property name, old value, new value, other own properties). I'm aware that entity changes are not supported for mongo entities.
How can I override the logic or where should mine be inserted for both cases (sql & mongo)? I've seen that the entity changes are loaded to log objects inside AbpDbContext.
Thanks in advance.
Hi, See https://docs.abp.io/en/abp/latest/Audit-Logging#audit-log-contributors
You can save audit logs into any database or destination you like.
Just implement & replace the IAuditingStore interface. If you implement it yourself, you can also remove Audit-logging module from your application, since its main function is to implement this interface.