public IActionResult Get_Search(string value) { var resBody = new ResponeBodyModel <List <CategoryMainDto> >(); try { resBody.errorCode = "0"; resBody.errorMessage = ""; if (value == null) { resBody.result = _cateMain.gets(); } else { resBody.result = _cateMain.get_search(value); } resBody.totalRecord = resBody.result.Count; } catch (NullReferenceException) { resBody.errorMessage = "404"; } catch (Exception ex) { resBody.errorMessage = ex.ToString(); } return(new ObjectResult(resBody)); }