Exemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            // set login user to true
            ViewBag.IsUserLoggedIn = true;

            // set user name, user id
            ViewBag.UserName = HttpContext.Session.GetString("UserName");
            loggedinuserId   = HttpContext.Session.GetString("UserId");

            // get account id
            accountId = await accountOperations.GetAccountIdByUserId(Convert.ToInt32(loggedinuserId));

            // set account id
            ViewBag.AccountId = accountId;

            // get balace for account id
            var balance = await accountOperations.GetAccountBalanceByAccountid(accountId);

            ViewBag.AccountBalance = balance;
            return(View());
        }