//Search public async Task <JsonResult> Search(UserSearchQuery model) { var result = new UserResults(); try { var response = await userService.GetAllAsync(model); result.Users = response.Users; result.Total = response.Total; } catch (Exception e) { Console.WriteLine(e); throw; } return(Json(result, JsonRequestBehavior.AllowGet)); }