public IResult Add(IFormFile file, CarImage carImage) { IResult result = BusinessRules.Run( CheckIfImageLimitExpired(carImage.CarId), CheckIfImageExtensionValid(file) ); if (result != null) { return(result); } carImage.ImagePath = ImageHelper.Add(file); carImage.Date = DateTime.Now; _carImageDal.Add(carImage); return(new SuccessResult()); }