Exemple #1
0
        public async Task <DashboardViewModel> GetDashboardViewModelAsync(long ukprn)
        {
            var dashboard = await _vacancyClient.GetDashboardAsync(ukprn);

            if (dashboard == null)
            {
                await _vacancyClient.GenerateDashboard(ukprn);

                dashboard = await _vacancyClient.GetDashboardAsync(ukprn);
            }

            var vm = DashboardMapper.MapFromProviderDashboard(dashboard);

            return(vm);
        }