public JsonResult DeleteData(int? id) { if (id > 0) { db.Delete(id.Value); return Json("success", JsonRequestBehavior.AllowGet); } return Json("error", JsonRequestBehavior.DenyGet); }
public void delete(DeletePatientRequest request) { try { var response = new DeletePatientResponse(); var bc = new PatientComponent(); bc.Delete(request.Id); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
public void Delete(int id) { bs.Delete(id); }