Example #1
0
        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));
        }
Example #2
0
 public IActionResult Update(int ID)
 {
     return(View(_ChampionshipService.Get(ID)));
 }