public ActionResult <Auction> Delete(int id) { Auction existing = dao.Get(id); if (existing == null) { return(NotFound("Auction not found")); } return(dao.Delete(id) ? NoContent() : StatusCode(500)); }
public ActionResult Delete(int id) { Auction auction = dao.Get(id); if (auction == null) { return(NotFound("Location does not exist")); } dao.Delete(id); return(NoContent()); }
public ActionResult Delete(int id) { if (dao.Delete(id)) { return(NoContent()); } else { return(NotFound()); } }
public ActionResult Delete(int id) { Auction existingId = dao.Get(id); if (existingId == null) { return(NotFound("Requested ID does not exist.")); } dao.Delete(id); return(NoContent()); }
public ActionResult Delete(int id) { Auction existingAuction = dao.Get(id); if (existingAuction == null) { return(NotFound("Auction does not exist. Try Again?")); } bool didDelete = dao.Delete(id); if (didDelete) { return(NoContent()); } return(StatusCode(500)); }
public ActionResult Delete(int id) { Auction auction = _dao.Get(id); if (auction == null) { return(NotFound("Auction does not exist")); } bool result = _dao.Delete(id); if (result) { return(NoContent()); } else { return(BadRequest()); } }
public ActionResult DeleteAuction(int id) { Auction auction = dao.Get(id); if (auction == null) { return(NotFound("Auction Not Found")); } else { bool deleted = dao.Delete(id); if (deleted) { return(NoContent()); } else { return(StatusCode(500, "uh oh..")); } } }
public ActionResult DeleteReservation(int id) { Auction existingAuction = dao.Get(id); if (existingAuction == null) { return(NotFound("Reservation Not Found")); } else { bool deleted = dao.Delete(id); if (deleted) { return(NoContent()); } else { return(StatusCode(500, "There was an error with the server - please call Joe Riggs for assistance and refuse to speak to anyone else...")); } } }