Пример #1
0
        public ActionResult Delete(string DepIds)
        {
            bool   isOk   = depLogic.Delete(DepIds);
            string result = (isOk == true ? "ok" : "no");

            return(Json(result));
        }
Пример #2
0
 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"));
     }
 }