예제 #1
0
 public async Task <ActionResult <Account> > AddAccount([FromBody] Account userSaving)
 {
     try
     {
         if (await _transactionService.AddAccount(userSaving))
         {
             return(StatusCode(StatusCodes.Status201Created, userSaving));
         }
         else
         {
             return(BadRequest());
         };
     }
     catch (Exception e)
     {
         return(BadRequest(e.InnerException));
     }
 }