コード例 #1
0
        private IQueryable <JobProfileApprenticeshipVacancyReport> GetDummyReportDataWithNulls()
        {
            var reportData = new List <JobProfileApprenticeshipVacancyReport>();
            var r          = new JobProfileApprenticeshipVacancyReport();

            r.JobProfile = new JobProfileReport()
            {
                Title = $"Dummy NO Data Profile "
            };
            reportData.Add(r);
            return(reportData.AsQueryable());
        }
コード例 #2
0
        private IQueryable <JobProfileApprenticeshipVacancyReport> GetDummyReportData(int numberRecords, int numberOfApprenticeship)
        {
            var reportData = new List <JobProfileApprenticeshipVacancyReport>();

            for (int ii = 0; ii < numberRecords; ii++)
            {
                var r = new JobProfileApprenticeshipVacancyReport();
                r.JobProfile = new JobProfileReport()
                {
                    Title = $"Dummy Profile {ii}", Name = $"profile_name{ii}"
                };
                r.SocCode = new SocCodeReport()
                {
                    SOCCode = $"DummySOC {ii}", Description = $"DummySOCDescription {ii}"
                };
                var frameworks = new List <TaxonReport>
                {
                    new TaxonReport {
                        Title = $"DummyFramework_1{ii}", LarsCode = $"LARSF_1{ii}"
                    },
                    new TaxonReport {
                        Title = $"DummyFramework_2{ii}", LarsCode = $"LARSF_2{ii}"
                    }
                };
                r.SocCode.Frameworks = frameworks.AsQueryable();

                var standards = new List <TaxonReport>
                {
                    new TaxonReport {
                        Title = $"DummyStandard_1{ii}", LarsCode = $"LARS_1{ii}"
                    },
                    new TaxonReport {
                        Title = $"DummyStandard_2{ii}", LarsCode = $"LARS_2{ii}"
                    },
                };
                r.SocCode.Standards = standards.AsQueryable();

                var a = new List <ApprenticeshipVacancyReport>();

                if (numberOfApprenticeship > 0)
                {
                    a.Add(new ApprenticeshipVacancyReport()
                    {
                        Title = $"Apprenticeship One Vacancy {ii}", DateCreated = DateTime.Now.AddDays(-ii)
                    });
                }

                if (numberOfApprenticeship > 1)
                {
                    a.Add(new ApprenticeshipVacancyReport()
                    {
                        Title = $"Apprenticeship Two Vacancy {ii}", DateCreated = DateTime.Now.AddDays(-ii)
                    });
                }

                r.ApprenticeshipVacancies = a;

                reportData.Add(r);
            }
            return(reportData.AsQueryable());
        }