public IResult Add(IFormFile image, CarImage carsImages) { // carsImages.CarImages = new FileHelper().(image); carsImages.Date = DateTime.Now; _carsImageDal.Add(carsImages); return(new SuccessesResult()); }
public IResult Add(IFormFile file, CarImage carImage) { IResult result = BusinessRules.Run(CarImageLimitExceeded(carImage.CarId)); if (result != null) { return(result); } carImage.ImagePath = FileHelpers.Add(file); carImage.CreationDate = DateTime.Now; _carImagesDal.Add(carImage); return(new SuccessResult(Messages.AddadCarImage)); }