public async Task <IActionResult> OnPostQueryAsync() { try { HttpClient httpclient = clientFactory.CreateClient(); ProblemsClient client = new ProblemsClient(httpclient); List <Core.Problems.ProblemMetadata> ms = (await client.QueryAsync(PostData.QueryId, PostData.QueryUserId, PostData.QueryName, PostData.QuerySource)).ToList(); List <ProblemModel> ss = new List <ProblemModel>(); foreach (Core.Problems.ProblemMetadata v in ms) { ss.Add(await ProblemModel.GetAsync(v, httpclient, false, false)); } Problems = ss; } catch { Problems = Array.Empty <ProblemModel>(); } return(Page()); }