public JsonResult GetOrders() { ResultResponseModel response = new ResultResponseModel(); try { SelectQueries query = new SelectQueries(); var result = query.SelectOrders(); response.data = result; response.error = new Error(200, "OK"); } catch (Exception ex) { response.error = new Error(500, ex.Message); } return(Json(response)); }