/// <summary> /// Change from "EntityModified" to "EntitySoftDeleted" for all entities of 'T' type or entities which the /// type derive from 'T' and which satisfy the predicate. /// </summary> /// <typeparam name="T">Generic type to soft delete entity.</typeparam> /// <param name="softDeletePredicate">The soft delete predicate.</param> /// <returns>An AuditConfiguration.</returns> public AuditConfiguration SoftDeleted <T>(Func <T, bool> softDeletePredicate) where T : class { SoftDeletedPredicates.Add(o => { var entity = o as T; return(entity != null && softDeletePredicate(entity)); }); return(this); }
/// <summary> /// Change from "EntityModified' to "EntitySoftDeleted" for all entities which satisfy the predicate. /// </summary> /// <param name="softDeletePredicate">The soft add predicate.</param> /// <returns>An AuditConfiguration.</returns> public AuditConfiguration SoftDeleted(Func <object, bool> softDeletePredicate) { SoftDeletedPredicates.Add(softDeletePredicate); return(this); }