public IActionResult CheckProductNameIsExist(string pName) { int pid = 0; IARresponse = BadRequest(); try { pid = objadminDb.CheckProductNameIsExist(pName); IARresponse = Ok(new { res = pid }); } catch (Exception ex) { IARresponse = BadRequest(ex.Message + " in AdminController CheckProductNameIsExist()"); } return(IARresponse); }