Exemplo n.º 1
0
        public virtual void Delete <T>(T entity)
        {
            if (entity.GetType().IsSubclassOf(typeof(BaseEntity)))
            {
                (entity as BaseEntity).Deleted   = true;
                (entity as BaseEntity).Activated = false;

                EntitiesUtil.ProcessAuditProperties(entity, this.GetServerDateTime(), null, this.Session);
                this.HibernateTemplate.Update(entity);
            }
            else
            {
                this.HibernateTemplate.Delete(entity);
            }
        }
Exemplo n.º 2
0
 public virtual void Update <T>(T entity)
 {
     EntitiesUtil.ProcessAuditProperties(entity, this.GetServerDateTime(), null, this.Session);
     this.HibernateTemplate.Update(entity);
 }
Exemplo n.º 3
0
 public virtual void Save(object entity)
 {
     EntitiesUtil.ProcessAuditProperties(entity, this.GetServerDateTime(), null, this.Session);
     this.HibernateTemplate.Save(entity);
 }