public ActionResult Delete(string DepIds) { bool isOk = depLogic.Delete(DepIds); string result = (isOk == true ? "ok" : "no"); return(Json(result)); }
public ActionResult <bool> Delete(int?Id) { if (Id.HasValue) { try { bool resultat = _logic.Delete((int)Id); return(resultat); } catch (Exception ex) { return(null); } } else { return(BadRequest("id invalide")); } }