Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
 public async Task DeleteLoanAsync(int id)
 => await loanRepo.DeleteLoanAsync(id);