Beispiel #1
0
        public IResult Add(IFormFile file, CarImage carImage)
        {
            var errorResult = BusinessTool.GetFailedLogic(CheckImageLimitExceed(carImage.CarId));

            if (errorResult != null)
            {
                return(errorResult);
            }
            var imageFullPath = FileHelper.AddImage(file);

            carImage.ImagePath   = imageFullPath;
            carImage.CreatedDate = DateTime.Now;
            _iCarImageDal.Add(carImage);
            return(new SuccessResult(Messages.SuccessfullyAdded));
        }