public async Task <ActionResult> SaveAccount(Account account) { try { if (await _accountRepository.AccountExist(account.Person_Code)) { return(StatusCode(400, "User already got an account!")); } account.Outstanding_Balance = 0; var numberOfRowsAffected = await _accountRepository.AddAccountAsync(account); return(StatusCode(200, $"{numberOfRowsAffected} number of row(s) affected.")); } catch (Exception exception) { return(StatusCode(500, exception.Message)); } }