コード例 #1
0
        public bool OnPreUpdate(PreUpdateEvent e)
        {
            if (_logger != null)
            {
                _logger.Update(e.Entity as IEntity);
            }

            var audit = e.Entity as IHaveAuditInformation;

            if (audit == null)
            {
                return(false);
            }

            var time = DateTime.Now;

            Set(e.Persister, e.State, "UpdatedAt", time);
            audit.UpdatedAt = time;

            return(false);
        }
コード例 #2
0
 public void OnPostUpdate(PostUpdateEvent e)
 {
     _checker.Update(e.Entity as IEntity);
 }