public ActionResult <IEnumerable <dynamic> > GetByCondition([FromQuery] string tql) { try{ if (string.IsNullOrEmpty(tql)) { return(BadRequest(new { message = "Is Null Or Empty" })); } else if (Regex.IsMatch(tql.ToUpper(), @"(SELECT|DELETE|COMMIT|BEGIN|DROP)")) { return(BadRequest(new { message = "Incorrect Query" })); } return(Ok(_TicketsService.GetByCondition(tql))); }catch (Exception e) { return(BadRequest(new { message = e.GetBaseException().Message })); } }