示例#1
0
        public IActionResult Index()
        {
            int id = HttpContext.Session.GetInt32(SessionHolder.SessionUserId).GetValueOrDefault();
            OverviewIndexViewModel vm = new OverviewIndexViewModel
            {
                NewReleases      = mapper.ToSmallReleaseViewModelCollection(releaseLogic.GetNewReleases(id)),
                PopulairReleases = mapper.ToSmallReleaseViewModelCollection(releaseLogic.GetPopulairReleases(id))
            };

            return(View(vm));
        }
示例#2
0
        public async Task OnGetAsync()
        {
            OverviewIndexVM = new OverviewIndexViewModel
            {
                OverviewBusinessUnitLocationsIndexVM = new List <OverviewBusinessUnitLocationsIndexViewModel>(),
                OverviewDivisionLocationsIndexVM     = new List <OverviewDivisionLocationsIndexViewModel>()
            };
            OverviewIndexVM.StudiesTotal = await _context.Study.CountAsync();


            OverviewIndexVM.LocationsTotal = await _context.Location.CountAsync();
        }