예제 #1
0
        public ActionResult Get(Guid id)
        {
            var user = _challengeRepository.GetChallenge(id);

            if (user == null)
            {
                return(NotFound("Challenge not found"));
            }

            return(Ok(user));
        }
예제 #2
0
        public ChallengeResponse GetChallenge(int id)
        {
            var challenge = _challengeRepository.GetChallenge(id);

            return(challenge == null ? null : _mapper.Map <ChallengeResponse>(challenge));
        }