public async Task <IActionResult> Index()
        {
            var language       = this.GetCurrentLanguage();
            var userId         = this.GetUserId <string>();
            var monthlyIncomes = await this.monthlyIncomeService.AllByUserIdLocalized <MonthlyIncomeViewModel>(userId, language);

            var viewModel = new MonthlyIncomesListingViewModel {
                MonthlyIncomes = monthlyIncomes
            };

            return(this.View(viewModel));
        }
        public async Task <IActionResult> GetSortedByAmount(string sortType)
        {
            var language = this.GetCurrentLanguage();
            var userId   = this.GetUserId <string>();
            IEnumerable <MonthlyIncomeViewModel> incomes;

            if (Enum.TryParse(sortType, true, out SortTypes parsedType))
            {
                incomes = await this.monthlyIncomeService.AllByUserIdLocalizedSortedByAmount <MonthlyIncomeViewModel>(userId, language, parsedType);
            }
            else
            {
                incomes = await this.monthlyIncomeService.AllByUserIdLocalized <MonthlyIncomeViewModel>(userId, language);
            }

            var viewModel = new MonthlyIncomesListingViewModel {
                MonthlyIncomes = incomes
            };

            return(this.PartialView("_MonthlyIncomesTableBodyPartial", viewModel));
        }