public async Task <IActionResult> Index(int Id) { if (Id == 0) { Id = CashAccount_Id; } else { CashAccount_Id = Id; } var accessToken = await HttpContext.GetTokenAsync("access_token"); var content = await _incomeRepository.GetIncome( "https://localhost:44382/Income/Get?id=" + Id.ToString(), accessToken); List <IncomeViewModel> incomeViewModels = new List <IncomeViewModel>(); if (content == null) { return(View(incomeViewModels)); } else { var incomes = _incomeRepository.DeseralizeIncomes(content); incomeViewModels = _mapper.Map <List <IncomeJsonModel>, List <IncomeViewModel> >(incomes); return(View(incomeViewModels)); } }