public IActionResult GetAllSizes() { try { var sizesList = SizesHelper.GetSizesList(); if (sizesList.Count > 0) { dynamic expando = new ExpandoObject(); expando.sizesList = sizesList; return(Ok(new APIResponse() { status = APIStatus.PASS.ToString(), response = expando })); } else { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = "No Data Found." })); } } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }
public IActionResult GetSizesList() { try { dynamic expando = new ExpandoObject(); expando.sizesList = SizesHelper.GetSizesList(); return(Ok(new APIResponse() { status = APIStatus.PASS.ToString(), response = expando })); } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }