コード例 #1
0
 protected virtual void SeedTlevelTestData()
 {
     _tlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, EnumAwardingOrganisation.Ncfe);
     _route   = TlevelDataProvider.CreateTlRoute(DbContext, EnumAwardingOrganisation.Ncfe);
     _pathway = TlevelDataProvider.CreateTlPathway(DbContext, EnumAwardingOrganisation.Ncfe);
     _tqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, EnumAwardingOrganisation.Ncfe);
     DbContext.SaveChangesAsync();
 }
コード例 #2
0
 protected override void SeedTlevelTestData()
 {
     _tlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, _awardingOrganisation);
     _route   = TlevelDataProvider.CreateTlRoute(DbContext, _awardingOrganisation);
     _pathway = TlevelDataProvider.CreateTlPathway(DbContext, _awardingOrganisation, _route);
     _tqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, _pathway, _tlAwardingOrganisation, _tlevelReviewStatus);
     DbContext.SaveChangesAsync();
 }
コード例 #3
0
 protected virtual void SeedTlevelTestData(EnumAwardingOrganisation awardingOrganisation = EnumAwardingOrganisation.Ncfe)
 {
     _tlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, awardingOrganisation);
     _route                  = TlevelDataProvider.CreateTlRoute(DbContext, awardingOrganisation);
     _pathway                = TlevelDataProvider.CreateTlPathway(DbContext, awardingOrganisation, _route);
     _specialisms            = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, _pathway);
     _tqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, _pathway, _tlAwardingOrganisation);
     DbContext.SaveChangesAsync();
 }
        protected virtual void SeedTestData()
        {
            TlAwardingOrganisation = TlevelDataProvider.CreateTlAwardingOrganisation(DbContext, EnumAwardingOrganisation.Pearson);
            Route   = TlevelDataProvider.CreateTlRoute(DbContext, EnumAwardingOrganisation.Pearson);
            Pathway = TlevelDataProvider.CreateTlPathway(DbContext, EnumAwardingOrganisation.Pearson, Route);
            TqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation);

            SeedProviderData();
            DbContext.SaveChangesAsync();
        }
コード例 #5
0
 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);
     Specialisms            = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, Pathway);
     TqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation);
     TlProvider             = ProviderDataProvider.CreateTlProvider(DbContext);
     TqProvider             = ProviderDataProvider.CreateTqProvider(DbContext, TqAwardingOrganisation, TlProvider);
     AssessmentSeries       = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(DbContext, null, true);
     DbContext.SaveChangesAsync();
 }
        protected override 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);
            Specialisms = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, Pathway);
            var tqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation);

            TlProvider = ProviderDataProvider.CreateTlProvider(DbContext);
            TqProvider = ProviderDataProvider.CreateTqProvider(DbContext, tqAwardingOrganisation, TlProvider);
            DbContext.SaveChangesAsync();
        }
コード例 #7
0
 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();
 }
        protected override 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);
            Specialisms = TlevelDataProvider.CreateTlSpecialisms(DbContext, awardingOrganisation, Pathway);
            var tqAwardingOrganisation = TlevelDataProvider.CreateTqAwardingOrganisation(DbContext, Pathway, TlAwardingOrganisation);

            TqProviders = new List <TqProvider>();
            TlProviders = ProviderDataProvider.CreateTlProviders(DbContext).ToList();

            foreach (var tlProvider in TlProviders)
            {
                TqProviders.Add(ProviderDataProvider.CreateTqProvider(DbContext, tqAwardingOrganisation, tlProvider));
            }
            AssessmentSeries = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(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);
            TlProviders            = ProviderDataProvider.CreateTlProviders(DbContext);
            TqProvider             = ProviderDataProvider.CreateTqProvider(DbContext, TqAwardingOrganisation, TlProviders.First());
            AssessmentSeries       = AssessmentSeriesDataProvider.CreateAssessmentSeriesList(DbContext, null, true);
            TlLookup               = TlLookupDataProvider.CreateTlLookupList(DbContext, null, true);

            foreach (var provider in TlProviders)
            {
                TlProviderAddressDataProvider.CreateTlProviderAddress(DbContext, new TlProviderAddressBuilder().Build(provider));
            }

            DbContext.SaveChangesAsync();
        }