public ActionResult DeleteUser(int id) { try { _paymentRepository.DeletePaymentDetail(id); return(Ok(200)); } catch (Exception ex) { throw ex; } }
public async Task <IActionResult> DeletePayment(int?pmId) { int result = 0; if (pmId == null) { return(BadRequest()); } try { result = await _paymentRepository.DeletePaymentDetail(pmId); if (result == 0) { return(NotFound()); } return(Ok(true)); } catch (Exception) { return(BadRequest()); } }