Example #1
0
        public void Manipulate(TEntity entity, Action <TEntity> action)
        {
            entity.DefineRules();
            AddValidationResult(entity);

            if (entity.ValidationResult.Count > 0)
            {
                Notification.Adicionar(entity.ValidationResult);
                return;
            }

            action(entity);
            _UoW.Commit();
        }