public async Task <IActionResult> DeleteLoanType(int LoanTypeId) { try { var response = await _service.DeleteLoanType(LoanTypeId); if (response != null) { return(Ok(response)); } return(StatusCode(StatusCodes.Status204NoContent)); } catch (Exception ex) { throw ex; } }
public async Task <IActionResult> DeleteConfirmed(int id) { await _loanTypeService.DeleteLoanType(id); return(RedirectToAction(nameof(Index))); }