public ActionResult Delete(int id) { CatCard card = cardDAO.GetCard(id); if (card == null) { return(NotFound("Card does not exist")); } cardDAO.RemoveCard(id); return(NoContent()); }
public ActionResult DeleteCard(int id) { if (cardDAO.GetCard(id) != null) { if (cardDAO.RemoveCard(id)) { return(NoContent()); } } else { return(NotFound()); } return(BadRequest()); }
public bool DeleteCard(int Id) { bool deleted = cardDAO.RemoveCard(Id); return(deleted); }
public bool RemoveCard(int id) { return(cardDAO.RemoveCard(id)); }