Example #1
0
        /// <summary>
        /// GET api/users/{id}
        /// </summary>
        /// <param name="id">user id</param>
        /// <returns><see cref="UserResponse"/></returns>
        public UserResponse Get(int id)
        {
            var result = service.Find(id);

            return(UserResponse.Create(result));
        }
Example #2
0
        public async Task <UserResponse> GetByAddressAsync(string address)
        {
            var user = await _userService.GetByAddressAsync(address);

            return(UserResponse.Create(user));
        }
Example #3
0
        /// <summary>
        /// GET api/users handler.
        /// </summary>
        /// <returns><see cref="UserResponse"/></returns>
        public UserResponse Get()
        {
            var result = service.Fetch();

            return(UserResponse.Create(result));
        }