public IResult Delete(CarImage carImage)
        {
            var oldpath = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..\\..\\..\\wwwroot")) + _carImagesDal.Get(I => I.ImagesId == carImage.ImagesId).ImagePath;

            var result = BusinessRules.Run(FileHelpers.Delete(oldpath));

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

            _carImagesDal.Delete(carImage);
            return(new SuccessResult(Messages.DeleteCarImage));
        }
 public IResult Delete(CarImage image)
 {
     _carsImageDal.Delete(image);
     return(new SuccessesResult());
 }