public AccountDetailStruct GetAccountDetail(uint accountID) { AccountDetailStruct result = new AccountDetailStruct(); try { access.SelectAccount(accountID); result.accountID = accountID; result.userID = access.GetOwner(); result.balance = access.GetBalance(); } catch (Exception) { var response = new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent("Account details could not be retreived"), ReasonPhrase = "Account could not be found" }; throw new HttpResponseException(response); } return(result); }
public uint GetOwner() { return(accountAccess.GetOwner()); }