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));
     }
 }
示例#2
0
 public ResponseModel <List <PersonsModel> > DeletePerson(int id)
 {
     _logger.Debug($"DeletePerson with code: {id}");
     return(_personService.DeletePerson(id));
 }
示例#3
0
 public void Delete(int id)
 {
     _personsService.DeletePerson(id);
 }