Exemplo n.º 1
0
 public Seeder(ShopDbContext context, CountryLoader countryLoader, IRandomDataGenerator randomDataGenerator)
 {
     this.context             = context;
     this.countryLoader       = countryLoader;
     this.randomDataGenerator = randomDataGenerator;
     this.customers           = new List <ApplicationUser>();
 }
Exemplo n.º 2
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedObjects, IConsoleLogger consoleLogger)
 {
     this.random = randomDataGenerator;
     this.db = companyEntities;
     this.count = countOfGeneratedObjects;
     this.logger = consoleLogger;
 }
 public ToyGeneratorsFactory(IRandomDataGenerator random, ILogger logger, ToyStoreEntities databaseContext, int checkPointFrequency = 1000)
 {
     this.random = random;
     this.logger = logger;
     this.databaseContext = databaseContext;
     this.checkPointFrequency = checkPointFrequency;
 }
Exemplo n.º 4
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toysStoreEntities, int countOfGeneratedObjects, IConsoleLogger consoleLogger)
 {
     this.random = randomDataGenerator;
     this.db = toysStoreEntities;
     this.count = countOfGeneratedObjects;
     this.logger = consoleLogger;
 }
 protected DataGenerator(int count, IRandomDataGenerator random, ILogger logger, int checkPointFrequency = 1000)
 {
     this.CheckPointFrequency = checkPointFrequency;
     this.Count = count;
     this.Logger = logger;
     this.Random = random;
 }
        private static void AddManagers(IRandomDataGenerator random, CompanyEntities db)
        {
            var employeeIDs = db.Employees.Select(c => c.ID).ToList();
            int i = 0;

            foreach (var employee in db.Employees)
            {
                if (random.GetRandomNumber(0, employeeIDs.Count - 1) < 95 * employeeIDs.Count / 100)
                {
                    var managerID = random.GetRandomNumber(1, employeeIDs.Count - 1);
                    while (managerID == i)
                    {
                        managerID = random.GetRandomNumber(1, employeeIDs.Count - 1);
                    }

                    employee.ManagerID = managerID;
                    db.SaveChanges();
                }

                i++;
            }
        }
 public DataGenerator(IRandomDataGenerator random, ContactDbContext contacts, int numberToGenerate)
 {
     this.random = random;
     this.db = contacts;
     this.count = numberToGenerate;
 }
 public ManufacturerGenerator(IRandomDataGenerator randomGenerator, ToyStoreEntities db, int count)
     : base(randomGenerator, db, count)
 {
 }
 public AgeRangesSeeder(ToyStoreEntities db, IRandomDataGenerator ran, int count)
     : base(db, ran, count)
 {
 }
Exemplo n.º 10
0
 public ProjectDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedObjects)
     :base(randomDataGenerator, companyEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 11
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toyStoreEntities, int countOfGeneratedObjects)
 {
     this.random = randomDataGenerator;
     this.db     = toyStoreEntities;
     this.count  = countOfGeneratedObjects;
 }
 public ManufacturerSeeder(ToyStoreEntities db, IRandomDataGenerator ran, int count)
     : base(db, ran, count)
 {
 }
Exemplo n.º 13
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedEntities)
 {
     this.random = randomDataGenerator;
     this.db = companyEntities;
     this.count = countOfGeneratedEntities;
 }
 public DepartmentDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedObjects, IConsoleLogger consoleLogger)
     : base(randomDataGenerator, companyEntities, countOfGeneratedObjects, consoleLogger)
 {
 }
Exemplo n.º 15
0
 public EmployeeDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities toyStoreEntities, int countOfGeneratedObjects)
     :base(randomDataGenerator, toyStoreEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 16
0
 public DataGenerator(IRandomDataGenerator randomGenerator, StudentSystemCFEntities database, int numberToGenerate)
 {
     this.random = randomGenerator;
     this.db     = database;
     this.count  = numberToGenerate;
 }
Exemplo n.º 17
0
 public DepartmentDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedEntities)
     : base(randomDataGenerator, companyEntities, countOfGeneratedEntities)
 {
 }
 public ManufacturerDataGenerator(IRandomDataGenerator randomDataGenerator, ToyStoreEntities toyStoreEntities, int countOfGeneratedOnjects)
     : base(randomDataGenerator, toyStoreEntities, countOfGeneratedOnjects)
 {
 }
 public AgeRangeGenerator(int count, IRandomDataGenerator random, ILogger logger, ToyStoreEntities databaseContext, int checkPointFrequency = 1000)
     : base(count, random, logger, checkPointFrequency)
 {
     this.databaseContext = databaseContext;
 }
Exemplo n.º 20
0
 public ProjectDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedEntities)
     : base(randomDataGenerator, companyEntities, countOfGeneratedEntities)
 {
 }
Exemplo n.º 21
0
 public DataGenerator(IToysStoreEntities toysStoreEntities, IRandomDataGenerator randomDataGenerator)
 {
     this.db     = toysStoreEntities;
     this.random = randomDataGenerator;
 }
Exemplo n.º 22
0
 public CardNumberDataGenerator(IRandomDataGenerator randomDataGenerator, ATMEntities atmEntities, int countGeneratedObjects)
     : base(randomDataGenerator, atmEntities, countGeneratedObjects)
 {
 }
Exemplo n.º 23
0
 public CardNumberDataGenerator(IRandomDataGenerator randomDataGenerator, ATMEntities atmEntities, int countGeneratedObjects)
     : base(randomDataGenerator, atmEntities, countGeneratedObjects)
 {
 }
Exemplo n.º 24
0
 public ReportsDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedEntities)
     : base(randomDataGenerator, companyEntities, countOfGeneratedEntities)
 {
 }
Exemplo n.º 25
0
 public SeederFactory(ToyStoreEntities db, IRandomDataGenerator ran)
 {
     this.db = db;
     this.ran = ran;
 }
Exemplo n.º 26
0
 public AgeRangeDataGenerator(IRandomDataGenerator randomGenerator, ToysStoreEntities toysStoreEntities, int countOfGeneratedObjects)
     : base(randomGenerator, toysStoreEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 27
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, ATMEntities atmEntities, int countGeneratedObjects)
 {
     this.random = randomDataGenerator;
     this.db = atmEntities;
     this.count = countGeneratedObjects;
 }
Exemplo n.º 28
0
 public ReportDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedObjects)
     : base(randomDataGenerator, companyEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 29
0
 public SampleDataGenerator(CompanyEntities companyEntitiesDbContext, IRandomDataGenerator randomDataGenerator, ILogger logger)
 {
     this.database = companyEntitiesDbContext;
     this.random   = randomDataGenerator;
     this.logger   = logger;
 }
Exemplo n.º 30
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, ATMEntities atmEntities, int countGeneratedObjects)
 {
     this.random = randomDataGenerator;
     this.db     = atmEntities;
     this.count  = countGeneratedObjects;
 }
Exemplo n.º 31
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedEntities)
 {
     this.random = randomDataGenerator;
     this.db     = companyEntities;
     this.count  = countOfGeneratedEntities;
 }
 public EmployeesProjectsDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedObjects)
     : base(randomDataGenerator, companyEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 33
0
 public DataGenerator(IRandomDataGenerator randomGenerator, ToyStoreEntities db, int count)
 {
     this.randomGenerator = randomGenerator;
     this.db = db;
     this.count = count;
 }
 public ToyStoreSeeder(ToyStoreEntities db, IRandomDataGenerator ran, int count)
 {
     this.ran = ran;
     this.db = db;
     this.count = count;
 }
Exemplo n.º 35
0
 public CategoryDataGenerator(IRandomDataGenerator randomDataGenerator, ToyStoreEntities toyStoreEntities, int countOfGeneratedOnjects)
     : base(randomDataGenerator, toyStoreEntities, countOfGeneratedOnjects)
 {
 }
Exemplo n.º 36
0
 public CategoryDataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toyStoreEntities, int countOfGeneratedObjects)
     :base(randomDataGenerator, toyStoreEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 37
0
 public AgeRangeDataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toyStoreEntities, int countOfGeneratedObjects)
     : base(randomDataGenerator, toyStoreEntities, countOfGeneratedObjects)
 {
 }
 public EmployeeGenerator(int count, IRandomDataGenerator random, ILogger logger, CompanyEntities databaseContext, int checkPointFrequency = 1000)
     : base(count, random, logger, checkPointFrequency)
 {
     this.databaseContext = databaseContext;
 }
Exemplo n.º 39
0
 public CategoryGenerator(IRandomDataGenerator randomGenerator, ToyStoreEntities db, int count)
     : base(randomGenerator, db, count)
 {
 }
Exemplo n.º 40
0
 public ReportsSampleDataGenerator(CompanyEntities companyEntitiesDbContext, IRandomDataGenerator randomDataGenerator, ILogger logger)
     : base(companyEntitiesDbContext, randomDataGenerator, logger)
 {
 }
 public OrderDataGenerator(IRandomDataGenerator randomDataGenerator, ordersEntities entities, int ordersCount)
 {
     this.random = randomDataGenerator;
     this.db     = entities;
     this.count  = ordersCount;
 }
Exemplo n.º 42
0
 public AgeRangeGenerator(IRandomDataGenerator randomGenerator, ToyStoreEntities db, int count)
     : base(randomGenerator, db, count)
 {
 }
Exemplo n.º 43
0
 public StudentDataGenerator(IRandomDataGenerator randomGenerator, StudentSystemCFEntities database, int numberToGenerate)
     : base(randomGenerator, database, numberToGenerate)
 {
 }
 public CategoryDataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toysStoreEntities, int countOfGeneratedObjects, IConsoleLogger consoleLogger)
     : base(randomDataGenerator, toysStoreEntities, countOfGeneratedObjects, consoleLogger)
 {
 }
Exemplo n.º 45
0
 public EmployeeDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities toyStoreEntities, int countOfGeneratedObjects)
     : base(randomDataGenerator, toyStoreEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 46
0
 public EmployeeDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfgeneratedObjects)
 {
     this.random = randomDataGenerator;
     this.db     = companyEntities;
     this.count  = countOfgeneratedObjects;
 }
Exemplo n.º 47
0
 public Worker(ILogger <Worker> logger, IRandomDataGenerator dataGenerator)
 {
     _logger        = logger;
     _dataGenerator = dataGenerator;
 }
Exemplo n.º 48
0
 public ContentFactory(IRandomDataGenerator randomDataGenerator)
 {
     this.randomGenerator = randomDataGenerator;
 }
 public AgeRangesDataGenerator(IToysStoreEntities toysStoreEntities, IRandomDataGenerator randomDataGenerator)
     : base(toysStoreEntities, randomDataGenerator)
 {
 }
 public ContactInfoGenerator(IRandomDataGenerator random, ContactDbContext contact, int count)
     : base(random, contact, count)
 {
 }
 public ManufacturerDataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toyStoreEntities, int countOfGeneratedObjects)
     :base(randomDataGenerator, toyStoreEntities, countOfGeneratedObjects)
 {
 }
Exemplo n.º 52
0
 public DataGenerator(IRandomDataGenerator randomDataGenerator, ToysStoreEntities toyStoreEntities, int countOfGeneratedObjects)
 {
     this.random = randomDataGenerator;
     this.db = toyStoreEntities;
     this.count = countOfGeneratedObjects;
 }
Exemplo n.º 53
0
 public DepartmentDataGenerator(IRandomDataGenerator randomDataGenerator, CompanyEntities companyEntities, int countOfGeneratedOnjects)
     : base(randomDataGenerator, companyEntities, countOfGeneratedOnjects)
 {
 }