public async Task <IActionResult> WalletInfo(WalletInfoRequestVM walletInfoRequestVM) { try { WalletInfoDTO walletInfoDTO = await WalletService.GetWalletInfo(walletInfoRequestVM.Jmbg, walletInfoRequestVM.Password); WalletInfoResponseVM walletInfoResponseVM = new WalletInfoResponseVM() { Jmbg = walletInfoDTO.Jmbg, FirstName = walletInfoDTO.FirstName, LastName = walletInfoDTO.LastName, BankType = EnumMapper.MapBankType(walletInfoDTO.BankType), BankAccount = walletInfoDTO.BankAccount, Balance = walletInfoDTO.Balance, UsedDepositThisMonth = walletInfoDTO.UsedDepositThisMonth, MaximalDeposit = walletInfoDTO.MaximalDeposit, UsedWithdrawThisMonth = walletInfoDTO.UsedWithdrawThisMonth, MaximalWithdraw = walletInfoDTO.MaximalWithdraw, IsBlocked = walletInfoDTO.IsBlocked, TransactionVMs = walletInfoDTO.TransactionDTOs.Select( transaction => new TransactionResposneVM() { Inflow = (EnumMapper.MapTransactionTypeFlow(transaction.Type) == "Inflow" ? transaction.Amount : 0M), Outflow = (EnumMapper.MapTransactionTypeFlow(transaction.Type) == "Outflow" ? transaction.Amount : 0M), Destination = transaction.Destination, Source = transaction.Source, TransactionDateTime = transaction.TransactionDateTime, Type = EnumMapper.MapTransactionType(transaction.Type), WalletBalance = transaction.WalletBalance } ).OrderByDescending(t => t.TransactionDateTime).ToList() }; ModelState.Clear(); return(View(new WalletInfoPageVM() { WalletInfoResponseVM = walletInfoResponseVM })); } catch (Exception ex) { ViewData["IsSuccessful"] = "no"; ViewData["ErrorMessage"] = ex.Message; return(View()); } }