public ActionResult Get(Guid id) { var user = _challengeRepository.GetChallenge(id); if (user == null) { return(NotFound("Challenge not found")); } return(Ok(user)); }
public ChallengeResponse GetChallenge(int id) { var challenge = _challengeRepository.GetChallenge(id); return(challenge == null ? null : _mapper.Map <ChallengeResponse>(challenge)); }