public async Task <IActionResult> GetByIdAsync(Guid id) { var player = await _playerService.GetByIdAsync(id); if (player != null) { return(Ok(PlayerAdapter.ToPlayerDTO(player))); } return(NoContent()); }
public async Task <IActionResult> GetAsync() { var players = await _playerService.GetAllAsync(); if (players.Any()) { return(Ok(players.Select(x => PlayerAdapter.ToPlayerDTO(x)))); } return(NoContent()); }