public void SeedTestData(EnumAwardingOrganisation awardingOrganisation = EnumAwardingOrganisation.Pearson) { AssessmentSeries = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(DbContext, null, true); TlProviders = ProviderDataProvider.CreateTlProviders(DbContext).ToList(); var tlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, awardingOrganisation); var routes = TlevelDataProvider.CreateTlRoutes(DbContext, awardingOrganisation); var pathways = TlevelDataProvider.CreateTlPathways(DbContext, awardingOrganisation, routes); TlSpecialisms = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, pathways.First()); TlLookup = TlLookupDataProvider.CreateTlLookupList(DbContext); var tqAwardingOrganisations = TlevelDataProvider.CreateTqAwardingOrganisations(DbContext, awardingOrganisation, tlAwardingOrganisation, pathways); DbContext.SaveChanges(); PathwayComponentGrades = TlLookup.Where(x => x.Category.Equals(LookupCategory.PathwayComponentGrade.ToString(), StringComparison.InvariantCultureIgnoreCase)).ToList(); TqProviders = new List <TqProvider>(); foreach (var tqAwardingOrganisation in tqAwardingOrganisations) { foreach (var tlProvider in TlProviders) { TqProviders.Add(ProviderDataProvider.CreateTqProvider(DbContext, tqAwardingOrganisation, tlProvider)); } } DbContext.SaveChanges(); }
protected virtual void SeedTestData(EnumAwardingOrganisation awardingOrganisation = EnumAwardingOrganisation.Pearson, bool seedMultipleProviders = false) { TlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, awardingOrganisation); Route = TlevelDataProvider.CreateTlRoute(DbContext, awardingOrganisation); Pathway = TlevelDataProvider.CreateTlPathway(DbContext, awardingOrganisation, Route); Specialism = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, Pathway).First(); TqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation); TlProvider = ProviderDataProvider.CreateTlProvider(DbContext); TqProvider = ProviderDataProvider.CreateTqProvider(DbContext, TqAwardingOrganisation, TlProvider); AssessmentSeries = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(DbContext, null, true); TlLookup = TlLookupDataProvider.CreateTlLookupList(DbContext, null, true); DbContext.SaveChangesAsync(); }
protected virtual void SeedTestData(EnumAwardingOrganisation awardingOrganisation = EnumAwardingOrganisation.Pearson, bool seedMultipleProviders = false) { TlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, awardingOrganisation); Route = TlevelDataProvider.CreateTlRoute(DbContext, awardingOrganisation); Pathway = TlevelDataProvider.CreateTlPathway(DbContext, awardingOrganisation, Route); Specialism = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, Pathway).First(); TqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation); TlProvider = ProviderDataProvider.CreateTlProvider(DbContext); TqProvider = ProviderDataProvider.CreateTqProvider(DbContext, TqAwardingOrganisation, TlProvider); AssessmentSeries = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(DbContext, null, true); TlLookup = TlLookupDataProvider.CreateTlLookupList(DbContext, null, true); PathwayComponentGrades = TlLookup.Where(x => x.Category.Equals(LookupCategory.PathwayComponentGrade.ToString(), StringComparison.InvariantCultureIgnoreCase)).ToList(); DbContext.SaveChangesAsync(); }
public void SeedData() { Qualifications = SeedQualificationsData(); TlLookup = TlLookupDataProvider.CreateTlLookupList(DbContext, null, true); }
public void SeedLookupData() { TlLookup = TlLookupDataProvider.CreateTlLookupList(DbContext, null, true); DbContext.SaveChangesAsync(); }