public ActionResult <bool> Delete(int id) { if (DAParam.Delete(id, out error)) { return(new OkObjectResult(true)); } return(NotFound(error)); }
public bool Param_Delete(int PARA_ID) { try { return(DAParam.Delete(PARA_ID)); } catch (Exception ex) { myServiceData.Result = false; myServiceData.ErrorMessage = "unforeseen error occured. Please try later."; myServiceData.ErrorDetails = ex.ToString(); throw new FaultException <ServiceData>(myServiceData, ex.ToString()); } }