Beispiel #1
0
        public uint CreateAccount(uint userID)
        {
            uint accountId = accountAccess.CreateAccount(userID);

            bankDb.SaveToDisk();
            return(accountId);
        }
Beispiel #2
0
        public AccountDetailStruct CreateAccount(uint userID)
        {
            AccountDetailStruct result = new AccountDetailStruct();

            try
            {
                result.accountID = access.CreateAccount(userID);
            }
            catch (Exception e)
            {
                var response = new HttpResponseMessage(HttpStatusCode.NotFound)
                {
                    Content      = new StringContent("Account could not be created"),
                    ReasonPhrase = "User could not be found"
                };
                throw new HttpResponseException(response);
            }

            return(GetAccountDetail(result.accountID));
        }
Beispiel #3
0
        public uint CreateAccount(uint userID)
        {
            uint accountId = accountAccess.CreateAccount(userID);

            return(accountId);
        }