public async Task <IActionResult> GetAll() { var users = await _userService.GetAll(); var userDtos = _mapper.Map <IList <AuthUserDto> >(users); return(Ok(userDtos)); }
public IActionResult GetAll() { try { var authUsers = _authUserService.GetAll("Gender,Province,District"); var result = Mapper.Map <IEnumerable <AuthUserGetGridViewModel> >(authUsers); return(Ok(result)); } catch (Exception e) { return(BadRequest(e.Message)); } }