public ActionResult DeletePerson(int personID) { try { if (_personsService.DeletePerson(personID)) { return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false, error = "Something wents wrong" }, JsonRequestBehavior.AllowGet)); } }catch (Exception ex) { return(Json(new { success = false, error = ex.Message }, JsonRequestBehavior.AllowGet)); } }
public ResponseModel <List <PersonsModel> > DeletePerson(int id) { _logger.Debug($"DeletePerson with code: {id}"); return(_personService.DeletePerson(id)); }
public void Delete(int id) { _personsService.DeletePerson(id); }