Example #1
0
File: SeedDb.cs Project: dpasc/4fun
 public void SeedCategories(BitStoreDB ctx)
 {
     ctx.Categories.Add(new Category {
         Name = "Fruit/Veg"
     });
     ctx.Categories.Add(new Category {
         Name = "Bakery"
     });
     ctx.Categories.Add(new Category {
         Name = "Drinks"
     });
     ctx.Categories.Add(new Category {
         Name = "House Hold"
     });
     ctx.Categories.Add(new Category {
         Name = "Snacks"
     });
     ctx.SaveChanges();
 }
Example #2
0
File: SeedDb.cs Project: dpasc/4fun
        public void SeedProducts(BitStoreDB ctx)
        {
            //Fruit + Veg
            ctx.Products.Add(new Product {
                Name = "Apple", Price = 0.55M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Orange", Price = 0.55M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Potato", Price = 0.75M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Banana", Price = 0.35M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Watermelon", Price = 2.75M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Pine Apple", Price = 1.80M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Cabbage", Price = 0.95M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Ginger", Price = 0.25M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Mushroom", Price = 0.42M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Eggplant", Price = 2.00M, CategoryId = 2
            });
            ctx.Products.Add(new Product {
                Name = "Tomatoe", Price = 1.50M, CategoryId = 2
            });


            //Bakery
            ctx.Products.Add(new Product {
                Name = "Tip-Top", Price = 2.00M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Muffin", Price = 0.72M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Mud Cake", Price = 5.50M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Wraps", Price = 3.60M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Baguette", Price = 2.55M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "English Muffins 6pk", Price = 2.65M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Apple Crumble", Price = 4.99M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Rye Bread", Price = 3.60M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Sourdough Roll", Price = 0.78M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Pikelets 12pk", Price = 4.50M, CategoryId = 3
            });
            ctx.Products.Add(new Product {
                Name = "Dinner Roll", Price = 0.30M, CategoryId = 3
            });


            //Drinks
            ctx.Products.Add(new Product {
                Name = "Sparkling Water", Price = 0.90M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Coke Cola", Price = 1.20M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Pepsi", Price = 1.00M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "String Valley Orange Mango", Price = 2.30M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Cream n Soda", Price = 0.90M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Sprite", Price = 0.98M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Ginger Beer", Price = 1.25M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Red Bull", Price = 0.99M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Lift", Price = 0.90M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Fanta", Price = 0.92M, CategoryId = 4
            });
            ctx.Products.Add(new Product {
                Name = "Ice Tea", Price = 1.25M, CategoryId = 4
            });

            //House hold
            ctx.Products.Add(new Product {
                Name = "Toilet Paper 12pk", Price = 5.85M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Mop", Price = 5.00M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Dustpan", Price = 3.25M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Frypan", Price = 20.55M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Tea Towel", Price = 6.00M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Foil Wrap 660M", Price = 2.36M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Oven Gloves", Price = 6.50M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Mortein", Price = 3.66M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Garbage Bags 200pk", Price = 4.55M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Paper Towels 2pk", Price = 2.55M, CategoryId = 5
            });
            ctx.Products.Add(new Product {
                Name = "Tissues 240pk", Price = 1.99M, CategoryId = 5
            });

            //Snacks
            ctx.Products.Add(new Product {
                Name = "Snickers", Price = 2.00M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Mars", Price = 2.00M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Twisties", Price = 0.99M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Ice Cream", Price = 4.95M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Cookies", Price = 2.75M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Trail Mix", Price = 4.00M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Popcorn", Price = 1.99M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Original Chips", Price = 0.99M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Pringles", Price = 2.70M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Twix", Price = 2.00M, CategoryId = 6
            });
            ctx.Products.Add(new Product {
                Name = "Gummy Bears", Price = 1.75M, CategoryId = 6
            });



            ctx.SaveChanges();
        }