Beispiel #1
0
        public async Task <IActionResult> AllLoans()
        {
            var user = await _userManager.GetUserAsync(HttpContext.User);

            var userId = user.Id;

            var accountLoans = await _accountLoanService.GetAccountLoansByUserId(userId);

            var loans = await _loanService.Get();

            ViewBag.loans = loans;

            return(View(accountLoans));
        }
        public Task <List <AccountLoan> > GetAccountLoansByUserId(int id)
        {
            var result = _accountLoanService.GetAccountLoansByUserId(id);

            return(result);
        }