public async Task <IActionResult> DeleteLoanAsync([FromQuery] int id) { try { return(StatusCode(StatusCodes.Status200OK, await _loan.DeleteLoanAsync(id))); } catch (Exception ex) { _logger.LogError(ex.Message); _logger.LogError(ex.StackTrace); return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public async Task DeleteLoanAsync(int id) => await loanRepo.DeleteLoanAsync(id);