Esempio n. 1
0
        public async Task <OverviewDto> BuildCurrentMonth()
        {
            MonthYear monthYear = dateService.GetCurrentMonthYear();

            IReadOnlyList <Statement> statements = await statementRepository.GetList(monthYear);

            IReadOnlyList <Bank>     banks      = bankRepository.GetList(dateService.GetCurrentMonthYear());
            IReadOnlyList <Category> categories = categoryRepository.GetList();

            MonthSummary summary = new MonthSummary(statements, banks);

            return(OverviewDto.Create(monthYear, summary, categories));
        }
Esempio n. 2
0
        public IActionResult Overview(DateTime?date)
        {
            OverviewDto myView = _expenseService.Overview(date);

            return(View(_mapper.Map <OverviewViewModel>(myView)));
        }