Version 3.4 introduces support for soft deletion on entities.
Suppose you have an interface/abstract class/base class which has "IsDeleted" property or ANY bool property which indicated that this entity is virtually deleted.
Then you can use this method to set it up. Just run it once on your application startup.
GlobalTrackingConfig.SetSoftDeletableCriteria<ISoftDeletable> (entity => entity.IsDeleted);
ISoftDeletablefrom the above example can be an interface or any base class.
- It needs to be created by you and won't be provided in this tracking library
IsDeletedfrom above example can have any name but need to be a bool property with public getter and setter
- If you change the soft-delete property from
trueand save that entity, the event type saved in audit log will be
- Important: If you change multiple properties including soft-delete property, it will still be detected and saved as
Un-deletion works the same way you would expect it to work; change soft delete property from
false and log will be saved as