public IActionResult GetBbrandList() { try { var brandList = BrandHelpers.GetBrands(); if (brandList.Count > 0) { dynamic expando = new ExpandoObject(); expando.BrandList = brandList; return(Ok(new APIResponse() { status = APIStatus.PASS.ToString(), response = expando })); } 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 GetBrandsList() { try { dynamic expando = new ExpandoObject(); expando.BrandsList = BrandHelpers.GetBrands(); return(Ok(new APIResponse() { status = APIStatus.PASS.ToString(), response = expando })); } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }