Ejemplo n.º 1
0
        public IResult Delete(CarImage carImage)
        {
            IResult result = BusinessRules.Run(CheckIfImageExsits(carImage.Id));

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

            string path = GetByCarImageId(carImage.Id).Data.ImagePath;

            CarImageFileHelper.Delete(path);
            _carImageDal.Delete(carImage);
            return(new SuccessResult());
        }
Ejemplo n.º 2
0
 public IResult Delete(CarImage carImage)
 {
     CarImageFileHelper.Delete(carImage.ImagePath);
     _carImageDal.Delete(carImage);
     return(new SuccessResult());
 }