public void Delete_Category() { CateogryDb obj = new CateogryDb(); bool result = obj.Delete(2); Assert.AreEqual(true, result); }
public IHttpActionResult Delete(int id) { try { if (dao.Delete(id)) { return(Ok("Record Deleted Successfully")); } else { return(BadRequest("Error Occurred")); } } catch (Exception ex) { return(BadRequest("Error Occurred")); } }