Example #1
0
        public virtual void Delete(object id, bool autoSave = true)
        {
            TEntity entity = _repository.FindById(id);

            _repository.Delete(entity, autoSave);
            _memoryCacheManager.Clear();

            //TO-DO: Log
        }
        public virtual void Delete(object id, bool autoSave = true)
        {
            TEntity entity = _repository.FindById(id);

            //Prevalidacion
            _validator.PreDelete(entity);

            _repository.Delete(entity, autoSave);

            //PostValidacion
            _validator.PostDelete(entity);

            _memoryCacheManager.Clear();

            //TO-DO: Log
        }