public async Task <IHttpActionResult> CreateTempQuery(string queryName, [FromBody] BaseRequest <string> wiql) { try { if (!string.IsNullOrEmpty(queryName) && wiql != null && !string.IsNullOrEmpty(wiql.RequestBody)) { ReportsRepository reportRepo = new ReportsRepository(); var linkString = await reportRepo.GeneratTempQuery(wiql.RequestBody, queryName); baseResponse <string> response = new baseResponse <string> { responseObject = linkString }; return(Ok(response)); } return(BadRequest()); } catch (Exception ex) { return(InternalServerError(ex)); } }