public ActionResult RemoveParkingCar(int id) { if (ModelState.IsValid) { ParkingLot.Sum += _repository.RemoveCar(id); ParkingLot.TotalCars++; ParkingLot.CarsParking--; _repositorySum.SaveSum(ParkingLot.Sum, ParkingLot.TotalCars); TempData["message"] = "A vehicle has left the parking house!"; return(RedirectToAction("List", new{ id = ParkingLot.Sum })); } TempData["message"] = "The vehicle has broken down."; return(RedirectToAction("List")); }