コード例 #1
0
 public IActionResult DeleteCategoryByAdmin([FromBody] int pcid)
 {
     IARresponse = BadRequest();
     try
     {
         if (objadmindb.DeleteCategoryByAdmin(pcid) == "")
         {
             IARresponse = Ok(new { res = "Category Deleted Successfully" });
         }
         else
         {
             IARresponse = BadRequest(new { res = "Category not Deleted... try again later!.." + objadmindb.DeleteCategoryByAdmin(pcid) });
         }
     }
     catch (Exception ex)
     {
         IARresponse = BadRequest(new { res = ex.Message });
     }
     return(IARresponse);
 }