public async Task <ActionResult <Stadium> > PutExistingStadium(string stadiumName, StadiumCommand command) { try { var stadiumClub = command.ClubName; var updatedStadium = _mapper.Map <Stadium>(command); await _repository.PutExistingStadium(stadiumName, stadiumClub, updatedStadium); _logger.LogInformation($"Stadium has been updated."); return(Ok()); } catch (System.Exception ext) { _logger.LogError(ext, "Stadium hasn't been updated."); // TODO return error object with proper error code. return(BadRequest()); } }