Exemplo n.º 1
0
        public AppViewModel(TestDbContext dbContext)
        {
            _dbContext = dbContext;

            StatisticByCountry = new StatisticOfRegistarionsViewModel((x) => dbContext.GetStatisticOfRistrationsByCountry())
            {
                GroupColumnHeader = "Страна"
            };
            StatisticByRegion = new StatisticOfRegistarionsViewModel((country) => dbContext.GetStatisticOfRistrationsByRegion(country), dbContext.GetCountryList())
            {
                GroupColumnHeader = "Регион"
            };
            StatisticByMonth = new StatisticOfRegistarionsViewModel((year) => dbContext.GetStatisticOfRistrationsByMonth(year), dbContext.GetYearList())
            {
                GroupColumnHeader = "Месяц"
            };
        }