Exemple #1
0
        protected TlProviderAddress AddProviderAddress(TlProviderAddress tlProviderAddress)
        {
            var address = TlProviderAddressDataProvider.CreateTlProviderAddress(DbContext, tlProviderAddress);

            DbContext.SaveChanges();
            return(address);
        }
Exemple #2
0
        protected IList <TlProviderAddress> SeedProviderAddress()
        {
            var addressess = TlProviderAddressDataProvider.CreateTlProviderAddress(DbContext, new TlProviderAddressBuilder().BuildList(TlProviders.First()));

            DbContext.SaveChanges();
            return(addressess);
        }
        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();
        }