public async Task <PlayerModel> GetPlayerAsync(long teamId, long playerId) { await ValidateTeamAsync(teamId); var playerEntity = await _footballRepository.GetPlayerAsync(teamId, playerId); if (playerEntity == null) { throw new NotFoundItemException($"The player with id: {playerId} does not exist in team with id:{teamId}."); } var playerModel = _mapper.Map <PlayerModel>(playerEntity); playerModel.TeamId = teamId; return(playerModel); }