Exemple #1
0
        public static void Initialize(PizzaStoreContext context)
        {
            var Toppings = new Topping[]
            {
                new Topping()
                {
                    Name  = "Extra cheese",
                    Price = 2.50m,
                },
                new Topping()
                {
                    Name  = "American bacon",
                    Price = 2.99m,
                },
                new Topping()
                {
                    Name  = "British bacon",
                    Price = 2.99m,
                },
                new Topping()
                {
                    Name  = "Canadian bacon",
                    Price = 2.99m,
                },
                new Topping()
                {
                    Name  = "Tea and crumpets",
                    Price = 5.00m
                },
                new Topping()
                {
                    Name  = "Fresh-baked scones",
                    Price = 4.50m,
                },
                new Topping()
                {
                    Name  = "Bell peppers",
                    Price = 1.00m,
                },
                new Topping()
                {
                    Name  = "Onions",
                    Price = 1.00m,
                },
                new Topping()
                {
                    Name  = "Mushrooms",
                    Price = 1.00m,
                },
                new Topping()
                {
                    Name  = "Pepperoni",
                    Price = 1.00m,
                },
                new Topping()
                {
                    Name  = "Duck sausage",
                    Price = 3.20m,
                },
                new Topping()
                {
                    Name  = "Venison meatballs",
                    Price = 2.50m,
                },
                new Topping()
                {
                    Name  = "Served on a silver platter",
                    Price = 250.99m,
                },
                new Topping()
                {
                    Name  = "Lobster on top",
                    Price = 64.50m,
                },
                new Topping()
                {
                    Name  = "Sturgeon caviar",
                    Price = 101.75m,
                },
                new Topping()
                {
                    Name  = "Artichoke hearts",
                    Price = 3.40m,
                },
                new Topping()
                {
                    Name  = "Fresh tomatoes",
                    Price = 1.50m,
                },
                new Topping()
                {
                    Name  = "Basil",
                    Price = 1.50m,
                },
                new Topping()
                {
                    Name  = "Steak (medium-rare)",
                    Price = 8.50m,
                },
                new Topping()
                {
                    Name  = "Blazing hot peppers",
                    Price = 4.20m,
                },
                new Topping()
                {
                    Name  = "Buffalo chicken",
                    Price = 5.00m,
                },
                new Topping()
                {
                    Name  = "Blue cheese",
                    Price = 2.50m,
                },
            };



            var Specials = new PizzaSpecial[]
            {
                new PizzaSpecial
                {
                    Name        = "Pizza clásica de queso",
                    Description = "Es de queso y delicioso. ¿Por qué no querrías una?",
                    BasePrice   = 189.99m,
                    ImageUrl    = "css/images/pizzas/cheese.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Tocinator",
                    Description = "Tiene TODO tipo de tocino",
                    BasePrice   = 227.99m,
                    ImageUrl    = "css/images/pizzas/bacon.jpg",
                },
                new PizzaSpecial()
                {
                    Name        = "Clásica de pepperoni",
                    Description = "Es la pizza con la que creciste, ¡pero ardientemente deliciosa!",
                    BasePrice   = 199.50m,
                    ImageUrl    = "css/images/pizzas/pepperoni.jpg",
                },
                new PizzaSpecial()
                {
                    Name        = "Pollo búfalo",
                    Description = "Pollo picante, salsa picante y queso azul, garantizado que entrarás en calor",
                    BasePrice   = 228.75m,
                    ImageUrl    = "css/images/pizzas/meaty.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Amantes del champiñón",

                    Description = "Tiene champiñones. ¿No es obvio?",
                    BasePrice   = 209.00m,
                    ImageUrl    = "css/images/pizzas/mushroom.jpg",
                },
                new PizzaSpecial()
                {
                    Name        = "Hawaiana",
                    Description = "De piña, jamón y queso...",
                    BasePrice   = 190.25m,
                    ImageUrl    = "css/images/pizzas/hawaiian.jpg",
                },
                new PizzaSpecial()
                {
                    Name        = "Delicia vegetariana",
                    Description = "Es como una ensalada, pero en una pizza",
                    BasePrice   = 218.50m,
                    ImageUrl    = "css/images/pizzas/salad.jpg",
                },
                new PizzaSpecial()
                {
                    Name        = "Margarita",
                    Description = "Pizza italiana tradicional con tomates y albahaca",
                    BasePrice   = 189.99m,
                    ImageUrl    = "css/images/pizzas/margherita.jpg",
                }
            };

            context.Toppings.AddRange(Toppings);
            context.Specials.AddRange(Specials);
            context.SaveChanges();
        }
Exemple #2
0
        public static void Initialize(PizzaStoreContext context)
        {
            var Specials = new PizzaSpecial[] {
                new PizzaSpecial
                {
                    Name = "Pizza clásica de queso",

                    Description = "Es de queso y delicioso. ¿Por qué no querrías una?",

                    BasePrice = 189.99m,

                    ImageUrl = "images/pizzas/cheese.jpg"
                },
                new PizzaSpecial()
                {
                    Name = "Tocinator",

                    Description = "Tiene TODO tipo de tocino",

                    BasePrice = 227.99m, ImageUrl = "images/pizzas/bacon.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Clásica de pepperoni",

                    Description = "Es la pizza con la que creciste, ¡pero ardientemente deliciosa!",

                    BasePrice = 199.50m,

                    ImageUrl = "images/pizzas/pepperoni.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Pollo búfalo",

                    Description = "Pollo picante, salsa picante y queso azul, garantizado que entrarás en calor",

                    BasePrice = 228.75m,

                    ImageUrl = "images/pizzas/meaty.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Amantes del champiñón",

                    Description = "Tiene champiñones. ¿No es obvio?",

                    BasePrice = 209.00m,

                    ImageUrl = "images/pizzas/mushroom.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Hawaiana",

                    Description = "De piña, jamón y queso...",

                    BasePrice = 190.25m,

                    ImageUrl = "images/pizzas/hawaiian.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Delicia vegetariana",

                    Description = "Es como una ensalada, pero en una pizza",

                    BasePrice = 218.50m,

                    ImageUrl = "images/pizzas/salad.jpg",
                },
                new PizzaSpecial()
                {
                    Name = "Margarita",

                    Description = "Pizza italiana tradicional con tomates y albahaca",

                    BasePrice = 189.99m,

                    ImageUrl = "images/pizzas/margherita.jpg",
                }
            };

            //Arreglo de toppings
            var Toppings = new Topping[]
            {
                new Topping
                {
                    Name  = "Queso extra",
                    Price = 47.50m
                },
                new Topping
                {
                    Name  = "Tocino de pavo",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Tocino de jabalí",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Tocino de ternera",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Té y bollos",
                    Price = 95.00m
                },
                new Topping
                {
                    Name  = "Bollos recién horneados",
                    Price = 85.50m
                },
                new Topping
                {
                    Name  = "Pimiento",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Cebolla",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Champiñones",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Pepperoni",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Salchicha de pato",
                    Price = 60.80m
                },
                new Topping
                {
                    Name  = "Albóndigas de venado",
                    Price = 47.50m
                },
                new Topping
                {
                    Name  = "Cubierta de langosta",
                    Price = 1225.50m
                },
                new Topping
                {
                    Name  = "Caviar de esturión",
                    Price = 1933.25m
                },
                new Topping
                {
                    Name  = "Corazones de alcachofa",
                    Price = 64.60m
                },
                new Topping
                {
                    Name  = "Tomates frescos",
                    Price = 39.00m
                },
                new Topping
                {
                    Name  = "Albahaca",
                    Price = 39.00m
                },
                new Topping
                {
                    Name  = "Filete",
                    Price = 161.50m
                },
                new Topping
                {
                    Name  = "Pimientos picantes",
                    Price = 79.80m
                },
                new Topping
                {
                    Name  = "Pollo búfalo",
                    Price = 95.00m
                },
                new Topping
                {
                    Name  = "Queso azul",
                    Price = 47.50m
                },
            };

            //Agregando datos al contexto almacenados en memoria
            context.Specials.AddRange(Specials);
            context.Toppings.AddRange(Toppings);
            //Guardado los datos en disco
            context.SaveChanges();
        }
Exemple #3
0
        public static void Initialize(PizzaStoreContext context)
        {
            var Specials = new PizzaSpecial[]
            {
                new PizzaSpecial
                {
                    Name        = "Pizzaz clàsica de queso",
                    Description = "Es de queso y delicioso. ¿Porquè no querrias una?",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/cheese.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Tocinator",
                    Description = "Tiene todo tipo de tocino.",
                    BasePrice   = 227.99m,
                    ImageUrl    = "images/pizzas/bacon.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Clàsica de peperoni",
                    Description = "Es la pizza con la que creciste, ¡pero ardientemente deliciosa!.",
                    BasePrice   = 199.50m,
                    ImageUrl    = "images/pizzas/pepperoni.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Pollo bùfalo",
                    Description = "Pollopicante, salsa picante y queso azùl, garantizado que entraras en calor.",
                    BasePrice   = 228.75m,
                    ImageUrl    = "images/pizzas/meaty.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Amantes del champiñòn",
                    Description = "Tiene champiñones. ¿No es obvio?",
                    BasePrice   = 209.00m,
                    ImageUrl    = "images/pizzas/mushroom.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Hawaiana",
                    Description = "De piña, jamòn y queso ...",
                    BasePrice   = 190.25m,
                    ImageUrl    = "images/pizzas/hawaiian.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Delicia vegetariana",
                    Description = "Es como una ensalada, pero en una pizza.",
                    BasePrice   = 218.50m,
                    ImageUrl    = "images/pizzas/salad.jpg"
                },

                new PizzaSpecial
                {
                    Name        = "Margarita",
                    Description = "Pizza italiana tradicionalcon tomates y albahaca.",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/margherita.jpg"
                },
            };

            context.Specials.AddRange(Specials);
            context.SaveChanges();

            var Toppings = new Topping[]
            {
                new Topping
                {
                    Name  = "Queso extra",
                    Price = 47.50m
                },

                new Topping
                {
                    Name  = "Tocino de pavo",
                    Price = 56.80m
                },

                new Topping
                {
                    Name  = "Tocino de jabalì",
                    Price = 56.80m
                },

                new Topping
                {
                    Name  = "Tocino de ternera",
                    Price = 56.80m
                },

                new Topping
                {
                    Name  = "Tè y bollos",
                    Price = 95.00m
                },

                new Topping
                {
                    Name  = "Bollos recièn horneados",
                    Price = 85.50m
                },

                new Topping
                {
                    Name  = "Pimiento",
                    Price = 19.00m
                },

                new Topping
                {
                    Name  = "Cebolla",
                    Price = 19.00m
                },

                new Topping
                {
                    Name  = "Champiñones",
                    Price = 19.00m
                },

                new Topping
                {
                    Name  = "Pepero ni",
                    Price = 19.00m
                },

                new Topping
                {
                    Name  = "Salchicha de pato",
                    Price = 60.80m
                },

                new Topping
                {
                    Name  = "Albòndiga de venado",
                    Price = 47.50m
                },

                new Topping
                {
                    Name  = "Cubierta de langosta",
                    Price = 1225.50m
                },

                new Topping
                {
                    Name  = "Caviar de esturiòn",
                    Price = 1933.25m
                },

                new Topping
                {
                    Name  = "Corazones de alcavhofa",
                    Price = 64.60m
                },

                new Topping
                {
                    Name  = "Tomates frescos",
                    Price = 39.00m
                },

                new Topping
                {
                    Name  = "Albahaca",
                    Price = 39.00m
                },

                new Topping
                {
                    Name  = "Filete",
                    Price = 161.50m
                },

                new Topping
                {
                    Name  = "Pimientos picantes",
                    Price = 79.80m
                },

                new Topping
                {
                    Name  = "Pollo bùfalo",
                    Price = 95.00m
                },

                new Topping
                {
                    Name  = "Queso azùl",
                    Price = 47.50m
                },
            };

            context.Toppings.AddRange(Toppings);
            context.SaveChanges();
        }
Exemple #4
0
        public static void Initialize(PizzaStoreContext context)
        {
            var specials = new PizzaSpecial[]
            {
                new PizzaSpecial()
                {
                    Name        = "Pizza clasica de queso",
                    Description = "Es de queso y delicioso. ¿Por que no querrias una?",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/cheese.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Tocinator",
                    Description = "Tiene todo tipo de tocino",
                    BasePrice   = 227.99m,
                    ImageUrl    = "images/pizzas/bacon.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Clasica de Pepperoni",
                    Description = "Es la pizza con la que creciste, ¡pero ardientemente!",
                    BasePrice   = 199.50m,
                    ImageUrl    = "images/pizzas/pepperoni.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Pollo búfalo",
                    Description = "Pollo picante, salsa picante y queso azul, garantizada",
                    BasePrice   = 228.75m,
                    ImageUrl    = "images/pizzas/meaty.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Amantes del champiñon",
                    Description = "Tiene champiñon ¿no es obvio?",
                    BasePrice   = 209.00m,
                    ImageUrl    = "images/pizzas/mushroom.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Hawaiana",
                    Description = "De piña, jamón y queso...",
                    BasePrice   = 190.25m,
                    ImageUrl    = "images/pizzas/hawaiian.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "Delicia Vegetariana",
                    Description = "Es como una ensalada, pero en una pizza",
                    BasePrice   = 218.50m,
                    ImageUrl    = "images/pizzas/salad.jpg"
                },
                new PizzaSpecial()
                {
                    Name        = "margarita",
                    Description = "Pizza italiana tradicional con tomates y albahaca",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/margherita.jpg"
                }
            };

            var toppings = new Topping[]
            {
                new Topping
                {
                    Name  = "Queso Extra",
                    Price = 47.50m
                },
                new Topping
                {
                    Name  = "Tocino de Pavo",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Tocino de jabali",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Tocino de ternera",
                    Price = 56.80m
                },
                new Topping
                {
                    Name  = "Té y Bollos",
                    Price = 95.00m
                },
                new Topping
                {
                    Name  = "Bollos recien horneados",
                    Price = 85.00m
                },
                new Topping
                {
                    Name  = "Cebolla",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Pimientos",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Champiñones",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Pepperoni",
                    Price = 19.00m
                },
                new Topping
                {
                    Name  = "Salchicha de pato",
                    Price = 60.80m
                },
                new Topping
                {
                    Name  = "Albondigas de venado",
                    Price = 47.50m
                },
                new Topping
                {
                    Name  = "Cubierta de langosta",
                    Price = 1225.50m
                },
                new Topping
                {
                    Name  = "Caviar de esturion",
                    Price = 1933.25m
                },
                new Topping
                {
                    Name  = "Corazones de Alchachofa",
                    Price = 64.60m
                },
                new Topping
                {
                    Name  = "Tomates Frescos",
                    Price = 39.00m
                },
                new Topping
                {
                    Name  = "Albahacas",
                    Price = 39.00m
                },
                new Topping
                {
                    Name  = "Filete",
                    Price = 161.50m
                },
                new Topping
                {
                    Name  = "Pimientos Picantes",
                    Price = 79.80m
                },
                new Topping
                {
                    Name  = "Pollo Bufalo",
                    Price = 95.00m
                },
                new Topping
                {
                    Name  = "Queso azul",
                    Price = 47.50m
                },
            };

            context.Toppings.AddRange(toppings);
            context.Specials.AddRange(specials);
            context.SaveChanges();
        }
Exemple #5
0
        public static void Initialize(PizzaStoreContext context)
        {
            var Specials = new PizzaSpecial[]
            {
                new PizzaSpecial
                {
                    Name        = "Pizza clásica de queso",
                    Description = "Es de queso y delicioso",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/cheese.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Tocinator",
                    Description = "Tiene TODO tipo de tocino",
                    BasePrice   = 227.99m,
                    ImageUrl    = "images/pizzas/bacon.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Clásica de pepperoni",
                    Description = "Es la pizza con la que cresiste, pero ardientemente deliciosa!",
                    BasePrice   = 199.50m,
                    ImageUrl    = "images/pizzas/pepperoni.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Pollo búfalo",
                    Description = "Pollo picante, salsa picante y queso azul, garantizado que entrarás en calor",
                    BasePrice   = 288.75m,
                    ImageUrl    = "images/pizzas/meaty.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Amantes del champiñón",
                    Description = "Tiene champiñones. No es obvio?",
                    BasePrice   = 209.00m,
                    ImageUrl    = "images/pizzas/mushroom.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Hawaiana",
                    Description = "De piña, jamón y queso...",
                    BasePrice   = 190.25m,
                    ImageUrl    = "images/pizzas/hawaiian.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Delicia vegetariana",
                    Description = "Es como una ensalada, pero en una pizza",
                    BasePrice   = 218.50m,
                    ImageUrl    = "images/pizzas/salad.jpg"
                },
                new PizzaSpecial
                {
                    Name        = "Margarita",
                    Description = "Pizza italiana tradicional con tomates y albahaca",
                    BasePrice   = 189.99m,
                    ImageUrl    = "images/pizzas/margherita.jpg"
                }
            };

            var Toppings = new Topping[]
            {
                new Topping {
                    Name = "Queso extra", Price = 47.50m
                },
                new Topping {
                    Name = "Tocino de pavo", Price = 56.80m
                },
                new Topping {
                    Name = "Salchicha de pato", Price = 60.80m
                },
                new Topping {
                    Name = "Albondigas de venado", Price = 47.50m
                },
                new Topping {
                    Name = "Cubierta de langosta", Price = 1220.50m
                },
                new Topping {
                    Name = "Caviar de esturion", Price = 1447.50m
                },
                new Topping {
                    Name = "Pimiento", Price = 19.00m
                },
                new Topping {
                    Name = "Cebolla", Price = 19.00m
                },
                new Topping {
                    Name = "Champiñones", Price = 19.00m
                },
                new Topping {
                    Name = "Bollos recien horneados", Price = 85.50m
                },
                new Topping {
                    Name = "Queso cheddar", Price = 20.50m
                }
            };

            context.Toppings.AddRange(Toppings);
            context.Specials.AddRange(Specials);
            context.SaveChanges();
        }