public async Task <ActionResult> Search(SearchRequestDTO request) { var result = new AllRobotsViewModel { Robots = await new HttpRequestHelper().Post <List <RobotInfoDTO>, SearchRequestDTO>($@"api/SearchRobots", request) }; return(View("Robots", result)); }
public async Task <ViewResult> Index() { var robotTypeDictionary = await new HttpRequestHelper().Get <Dictionary <int, string> >($@"api/GetRobotTypes"); var result = new AllRobotsViewModel { Robots = await new HttpRequestHelper().Get <List <RobotInfoDTO> >($@"api/GetAllRobots"), ChoresList = await new HttpRequestHelper().Get <List <ChoreDTO> >($@"api/GetChoresList"), RobotTypesList = new DropdownsHelper().GetSelectListItems(robotTypeDictionary), }; return(View("Robots", result)); }