Exemplo n.º 1
0
 public async Task<UserCompleteDto> GetUsers(int from = 0, int size = 20)
 {
     if (size > 1000) size = 1000;
     var users = await _userService.GetAllAsync(from,size);
     var result = new UserCompleteDto {Users = users.ToList()};
     return result;
 }
Exemplo n.º 2
0
 public async Task<IHttpActionResult> GetUser(string username)
 {
     var user = await _userService.GetSingleAsync(username);
     if (user == null)
     {
         return NotFound();
     }
     var result = new UserCompleteDto() { Users = new List<UserDto>() };
     result.Users.Add(user);
     return Ok(result);
 }