Esempio n. 1
0
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var account = await _repo.Get(id);

            if (account == null)
            {
                return(NotFound());
            }
            AccountVM bavm = new AccountVM
            {
                Account      = account,
                Transactions = (await _repo.GetTransactions())
                               .Where(acct => acct.AccountID == id)
                               .Reverse()
                               .Take(10)
                               .ToList(),
                AccountUserId = account.AppUserId
            };

            return(View(bavm));
        }