public IResult Delete(CarImages item)
        {
            IResult result = BusinessRules.Run(CheckDelete(item));

            if (result != null)
            {
                return(result);
            }
            _ICarImagesDAL.Delete(item);
            return(new SuccessResult(Messages.ImagesDeleted));
        }
Beispiel #2
0
        public IResult Delete(CarImages carImage)
        {
            IResult result = BusinessRules.Run(
                FileHelper.Delete(_carImageDal.Get(p => p.Id == carImage.Id).ImagePath));

            if (result != null)
            {
                return(result);
            }

            _carImageDal.Delete(carImage);
            return(new SuccessResult());
        }