Exemplo n.º 1
0
        /// <summary>
        /// Gets a user by id
        /// </summary>
        /// <param name="id">
        /// The id.
        /// </param>
        /// <returns>
        /// The <see cref="GetUser"/>.
        /// </returns>
        /// <exception cref="NotFoundException">
        /// Thrown for invalid user id.
        /// </exception>
        /// <remarks>
        /// GET users/B5608F8E-F449-E211-BB40-1040F3A7A3B1
        /// </remarks>
        public GetUser Get(Guid id)
        {
            var user = _userDataMapper.FindById(id);

            if (user == null)
            {
                throw new NotFoundException();
            }

            return(_mapper.Map <User, GetUser>(user));
        }