예제 #1
0
        public IActionResult Edit(int id)
        {
            var stadium          = stadiumService.Get(id);
            var stadiumViewModel = new StadiumViewModel
            {
                Id             = id,
                Name           = stadium.Name,
                FoundedOn      = stadium.FoundedOn,
                Capacity       = stadium.Capacity,
                CountryId      = stadium.Country.Id,
                CountryName    = stadium.Country.Name,
                CountriesItems = countryService.GetAllAsKeyValuePairs()
            };

            return(View(stadiumViewModel));
        }
예제 #2
0
 public GetStadiumsResponse Get()
 {
     return(_stadiumService.Get());
 }