Exemplo n.º 1
0
        private async Task ValidateTeamAsync(long teamId)
        {
            var team = await _footballRepository.GetTeamAsync(teamId);

            if (team == null)
            {
                throw new NotFoundItemException($"The team with id: {teamId} does not exists.");
            }
        }
Exemplo n.º 2
0
        public async Task <TeamWithPlayerModel> GetTeamAsync(long teamId)
        {
            var team = await _foootballRepository.GetTeamAsync(teamId);

            if (team == null)
            {
                throw new NotFoundItemException($"The team with id: {teamId} does not exists.");
            }


            return(_mapper.Map <TeamWithPlayerModel>(team));
        }