Esempio n. 1
0
        public ActionResult Get()
        {
            Round[] roundResult;
            try
            {
                roundResult = _service.GetAll().ToArray();
            }
            catch (Exception e)
            {
                return(StatusCode(500, e));
            }

            return(Ok(roundResult));
        }
		public async Task<IActionResult> GetAll(int seasonId)
		{
			GetAllRoundsResponse response = await _service.GetAll(seasonId);
			return Ok(response);
		}
Esempio n. 3
0
        public async Task <IActionResult> GetByTournament(int tournamentId)
        {
            var tournaments = await _roundService.GetAll(tournamentId);

            return(Json(Mapper.Map <IEnumerable <Round>, IEnumerable <RoundViewModel> >(tournaments)));
        }