public HttpResponseMessage Post(SearchString searchString) { try { SearchQueryResponse resp = LUISAdapter.GetSearchQuery(searchString.Query); if (!String.IsNullOrEmpty(resp.SearchQuery)) { List <DisplayOrder> orders = new List <DisplayOrder>(); using (MySqlConnection conn = DBUtils.GetConnection()) { DisplayOrderHistoryRepository repo = new DisplayOrderHistoryRepository(conn); orders = repo.GetByQuery(resp.SearchQuery).ToList <DisplayOrder>(); } return(Request.CreateResponse(HttpStatusCode.OK, orders)); } return(Request.CreateResponse(HttpStatusCode.OK, new List <DisplayOrder>())); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.OK, ex.Message)); } }
public ActionResult Search(string searchString) { SearchQueryResponse resp = LUISAdapter.GetSearchQuery(searchString); return(View(resp)); }