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)); }
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(); }