public async Task <IActionResult> PostAccount([FromBody] Account account)
        {
            try
            {
                account.User = _userName;
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                Account response = await _repo.AddAccountAsync(account);

                if (response == null)
                {
                    return(NotFound());
                }
                else
                {
                    return(Ok(response));
                }
            }
            catch (Exception e)
            {
                HandleException(e, ControllerContext.RouteData.Values["action"].ToString(), "", false);
                return(NotFound());
            }
        } //PostAccount
 public async Task<IActionResult> AddAccountAsync(Account a)
 {
     //API returns the database ID of the added item
     try
     {
         return Ok(await _repo.AddAccountAsync(a));
     }
     catch (Exception e)
     {
         HandleException(e, ControllerContext.RouteData.Values["action"].ToString(), "", false);
         return NotFound();
     }
 }