public async Task <ActionResult> GetAsync([FromQuery] QueryRequest q) { if (q.InterviewId > 0) { await _interviewService.UpdateResponseAsync(q.InterviewId, q.Query.FirstOrDefault(), q.TimeTaken, q.Email); } QueryResponse queryResponse = await _httpClient.GetAsync <QueryResponse>(q.ToQueryString()); queryResponse.Result.DialogflowGeneratedIntentId = queryResponse.Result.Metadata.IntentId; queryResponse.Result.InterviewId = await _interviewService.CreateResponseAsync(q.UserId, queryResponse.Result.DialogflowGeneratedIntentId, queryResponse.Result.Fulfillment.Speech, q.Email); if (q.FirstRequest) { await _userService.UpdateUserInterviewDateAsync(q.UserId, q.Email); } if (queryResponse.Result.Metadata.EndConversation) { await _userService.UpdateUserInterviewCompletedAsync(q.UserId, q.Email); } return(await GetResponseAsync(async() => await Task.FromResult(queryResponse))); }