public List <UserDTO> getAllUsers() { List <UserDTO> list = new List <UserDTO>(); List <User> users = _service.GetAllUsers(); foreach (User user in users) { list.Add(_mapper.Map <UserDTO>(user)); } return(list); }