public ActionResult Create(CarViewModel carViewModel, HttpPostedFileBase uploadImage) { if (ModelState.IsValid && uploadImage != null) { carViewModel.Image = carViewModel.Image = _service.GetCarImage(uploadImage); var carDto = carViewModel.ToCarDto(); _service.AddCar(carDto); return(RedirectToAction("Index")); } return(View(carViewModel)); }