public IActionResult Edit(int id) { var championship = championshipService.Get(id); var championshipViewModel = new ChampionshipViewModel { Id = id, Name = championship.Name, FoundedOn = championship.FoundedOn, Description = championship.Description, CountryId = championship.Country.Id, CountryName = championship.Country.Name, CountriesItems = countryService.GetAllAsKeyValuePairs() }; return(View(championshipViewModel)); }
public IActionResult Update(int ID) { return(View(_ChampionshipService.Get(ID))); }