예제 #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());
        }
 public IResult Delete(CarImage carImage)
 {
     CarImageFileHelper.Delete(carImage.ImagePath);
     _carImageDal.Delete(carImage);
     return(new SuccessResult());
 }