public async Task <IActionResult> Delete(int?id) { if (id.HasValue) { try { var obj = (await objRep.Delete(id.Value)); if (obj.Successed) { if (obj.ResultObject == 0) { return(NotFound()); } return(Ok(obj)); } else { return(NotFound(obj)); } } catch (Exception) { return(BadRequest()); } } else { return(BadRequest()); } }
public IActionResult Delete(int id) { if (id <= 0) { return(BadRequest()); } bool isSuccess = _personnelRepository.Delete(id); if (!isSuccess) { return(BadRequest()); } return(Ok()); }
public string Delete(int id) { return(_dataRepository.Delete(id)); }
public void Delete(int id) { _repo.Delete(id); }