Exemplo n.º 1
0
 public IActionResult DepositMoney(string accountNumber, decimal amount)
 {
     try
     {
         return(Ok(transactionbussinessLayer.DepositMoney(accountNumber, amount)));
     }
     catch (FirstDepositException e)
     {
         return(StatusCode(StatusCodes.Status406NotAcceptable, new Response {
             Message = e.Message
         }));
     }
     catch (Exception e)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, new Response {
             Message = e.Message
         }));
     }
 }