예제 #1
0
        /// <summary>
        ///     Change from "EntityModified" to "EntitySoftAdded" 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 add entity.</typeparam>
        /// <param name="softAddPredicate">The soft add predicate.</param>
        /// <returns>An AuditConfiguration.</returns>
        public AuditConfiguration SoftAdded <T>(Func <T, bool> softAddPredicate) where T : class
        {
            SoftAddedPredicates.Add(o =>
            {
                var entity = o as T;
                return(entity != null && softAddPredicate(entity));
            });

            return(this);
        }
예제 #2
0
 /// <summary>
 ///     Change from "EntityModified" to "EntitySoftAdded" for all entities which satisfy the predicate.
 /// </summary>
 /// <param name="softAddPredicate">The soft add predicate.</param>
 /// <returns>An AuditConfiguration.</returns>
 public AuditConfiguration SoftAdded(Func <object, bool> softAddPredicate)
 {
     SoftAddedPredicates.Add(softAddPredicate);
     return(this);
 }