Auditing multiple deleted entities

Posts   
 
    
karolism
User
Posts: 3
Joined: 03-Oct-2017
# Posted on: 03-Oct-2017 14:33:40   

Hello,

I'm trying to implement auditing logic and was wondering if it is possible to somehow get removed entities in AuditorBase.AuditDirectDeleteOfEntities method like IEntityCore entity in the AuditorBase.AuditDeleteOfEntity method?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 03-Oct-2017 18:57:44   

Direct Delete is executed directly on the database not on a set of pre-fetched entities. So Actually the system doesn't have the entities in hand while executing the delete.

Ad it wouldn't make sense for the system to fetch the entities before executing the deletes, because the developer can do that himself and avoid direct deletes, or at least execute direct deletes after fetching the entities.

So if you resort to direct deletes, without fetching the entities, then the info passed to the AuditDirectDeleteOfEntities is all what the system can provide.

karolism
User
Posts: 3
Joined: 03-Oct-2017
# Posted on: 04-Oct-2017 08:13:31   

Ok, thanks for the answer.