public ActionResult AddCar(AddCarDto addCarDto) { if (!ModelState.IsValid) { var locationList = _adminServices.GetLocationNamesList(); ViewBag.locations = locationList.Select(x => new SelectListItem() { Text = x }); return(View(addCarDto)); } var a = _adminServices.AddCar(addCarDto); return(Redirect("/Admin")); }