public void Generate()
 {
     for (int i = 1; i < 10; i++)
     {
         var customer = new AutoExpandCustomer
         {
             Id    = i,
             Stuff = new AutoExpandStuff
             {
                 Id    = i,
                 Bonus = new SelectBonus
                 {
                     Id      = i,
                     Ammount = i * 1000
                 }
             }
         };
         _db.AutoExpandCustomers.Add(customer);
     }
     _db.SaveChanges();
 }
Exemple #2
0
 public void Generate()
 {
     for (int i = 1; i < 10; i++)
     {
         var customer = new AutoExpandCustomer
         {
             Id = i,
             Stuff = new AutoExpandStuff
             {
                 Id = i,
                 Bonus = new SelectBonus
                 {
                     Id = i,
                     Ammount = i*1000
                 }
             }
         };
         _db.AutoExpandCustomers.Add(customer);
     }
     _db.SaveChanges();
 }