public async Task <ActionResult> AddStadium(StadiumAddModel stadium) { if (ModelState.IsValid) { await stadiumService.Add(stadium); return(RedirectToAction("Index")); } else { StadiumModelWithCountries model = await stadiumService.GetStadiumWithCountries(); return(View("Add", model)); } }
public async Task <ActionResult> SaveStadium(StadiumModel stadium) { if (ModelState.IsValid) { await stadiumService.Edit(stadium); return(RedirectToAction("Index")); } else { StadiumModelWithCountries model = await stadiumService.GetStadiumWithCountries(new StadiumIdModel() { Id = stadium.Id }); return(View("Edit", model)); } }
public async Task <ActionResult> Edit(StadiumIdModel stadium) { StadiumModelWithCountries model = await stadiumService.GetStadiumWithCountries(stadium); return(View(model)); }