示例#1
0
 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
         }));
     }
 }
示例#2
0
 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
         }));
     }
 }