public IResult Delete(CarImages item) { IResult result = BusinessRules.Run(CheckDelete(item)); if (result != null) { return(result); } _ICarImagesDAL.Delete(item); return(new SuccessResult(Messages.ImagesDeleted)); }
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()); }