public IHttpActionResult GetAccountList() { var result = _service.AccountList(); if (result.Status != BankRequestStatus.Done) { return(BadRequest(result.Message)); } return(Ok <IEnumerable <AccountListViewModel> >(_service.AccountList(). Value.Select(item => new AccountListViewModel() { Id = item.Id, UserName = item.UserName, AccountBalance = item.AccountBalance }))); }