public async Task <IActionResult> GetByIdAsync(Guid id) { var ranking = await _rankingService.GetByIdAsync(id); if (ranking != null) { return(Ok(RankingAdapter.ToRankingDTO(ranking))); } return(NoContent()); }
public async Task <IActionResult> GetAsync() { var ranking = await _rankingService.GetAllAsync(); if (ranking.Any()) { return(Ok(ranking.Select(x => RankingAdapter.ToRankingDTO(x)))); } return(NoContent()); }