Ejemplo n.º 1
0
        public async Task <IActionResult> Add(CarView result)
        {
            if (!ModelState.IsValid)
            {
                return(View(result));
            }

            var resultModel = CarHelpers.ConvertToModel(result);
            await _carService.Create(resultModel);

            await _cloudinaryService.AddCarImage(result.CarFileImg, resultModel.Id);

            return(RedirectToAction("List"));
        }