public ActionResult AddParking(Parking parking, string name, int id) { if (name == "Hotel") { repository.AddParkingToHotel(parking, id); return(RedirectToAction("EditHotel", new { id = id })); } else if (name == "Resort") { repository.AddParkingToResort(parking, id); return(RedirectToAction("EditResort", new { id = id })); } return(View("Error")); }