示例#1
0
        public void Modified(object modifiled, DateTime timestamp)
        {
            Guid currentId = this.CurrentUserId ?? Guid.Empty;

            if (currentId == Guid.Empty)
            {
                throw new InvalidOperationException("IAudit User not defined.");
            }

            // Step 1. IAudit
            IAudit audit = modifiled as IAudit;

            if (audit != null)
            {
                audit.UpdatedById = currentId;
                audit.Updated     = timestamp;
            }

            CacheHelper2.Notify(modifiled, this.Message, CacheActionTypes.Update);
        }
示例#2
0
 public void Deleted(object deleted, DateTime timestamp)
 {
     CacheHelper2.Notify(deleted, this.Message, CacheActionTypes.Delete);
 }