public async Task <ReportsDashboardViewModel> GetDashboardViewModel(long ukprn) { var reports = await _vacancyClient.GetReportsForProviderAsync(ukprn); var vm = new ReportsDashboardViewModel { ProcessingCount = reports.Count(r => r.IsProcessing), Reports = reports .OrderByDescending(r => r.RequestedOn) .Select(r => new ReportRowViewModel { ReportId = r.Id, ReportName = r.ReportName, DownloadCount = r.DownloadCount, CreatedDate = r.RequestedOn.ToUkTime().AsGdsDateTime(), CreatedBy = r.RequestedBy.Name, Status = r.Status, IsProcessing = r.IsProcessing }) }; return(vm); }