Beispiel #1
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());
        }
 public IDataResult <CarImages> GetById(int id)
 {
     return(new SuccessDataResult <CarImages>(_ICarImagesDAL.Get(i => i.Id == id)));
 }