public void Show(PizzaSpecial special) { ConfiguringPizza = new Pizza() { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>() }; }
public void ShowConfigurePizzaDialog(PizzaSpecial special) { this.ConfiguringPizza = new Pizza { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>() }; this.ShowconfigurationDialog = true; }
void ShowConfigurePizzaDialog(PizzaSpecial special) { configuringPizza = new Pizza() { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>(), }; showingConfigureDialog = true; }
public void OrderingPizza(PizzaSpecial special) { Pizza configuredPizza = new Pizza { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize }; Order.Pizzas.Add(configuredPizza); }
public void ShowConfigurePizzaGialog(PizzaSpecial special) { ConfiguringPizza = new Pizza() { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>() }; ShowingConfigureGialog = true; }
public async Task UpdateSpecial(PizzaSpecial special) { if (special.Id != 0) { _db.Update(special); } else { _db.Add(special); } await _db.SaveChangesAsync(); _cacheHelper.ClearCache(CacheKeys.AllSpecials); }
public void ShowConfigurePizzaDialog(PizzaSpecial special) { logger.LogInformation($"Configuring pizza {special.Id}"); ConfiguringPizza = new Pizza() { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>(), }; ShowingConfigureDialog = true; }
public void ShowConfigurePizzaDialog(PizzaSpecial special) { if (special == null) { throw new ArgumentException("There are no any specials", "special"); } ConfiguringPizza = new Pizza() { Special = special, SpecialId = special.Id, Size = Pizza.DefaultSize, Toppings = new List <PizzaTopping>(), }; ShowingConfigureDialog = true; }
public static void Initialize(PizzaStoreContext context) { var specials = new PizzaSpecial[] { new PizzaSpecial() { Name = "Basic Cheese Pizza", Description = "It's cheesy and delicious. Why wouldn't you want one?", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", Description = "It has EVERY kind of bacon", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", Description = "It's the pizza you grew up with, but Blazing hot!", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", Description = "Spicy chicken, hot sauce and bleu cheese, guaranteed to warm you up", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", } }; context.AddRange(specials); context.SaveChanges(); }
public void ShowConfigurePizzaDialog(PizzaSpecial special) { ConfiguringPizzaDialog.Show(special); }
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(); }
public async Task DeleteSpecial(PizzaSpecial special) { _db.Specials.Remove(special); await _db.SaveChangesAsync(); }
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(); }
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(); }
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(); }
public static void Initialize(PizzaStoreContext db) { 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 tomatos", 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 = "Basic Cheese Pizza", Description = "It's cheesy and delicious. Why wouldn't you want one?", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", Description = "It has EVERY kind of bacon", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", Description = "It's the pizza you grew up with, but Blazing hot!", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", Description = "Spicy chicken, hot sauce and bleu cheese, guaranteed to warm you up", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", }, new PizzaSpecial() { Id = 5, Name = "Mushroom Lovers", Description = "It has mushrooms. Isn't that obvious?", BasePrice = 11.00m, ImageUrl = "img/pizzas/mushroom.jpg", }, new PizzaSpecial() { Id = 6, Name = "The Brit", Description = "When in London...", BasePrice = 10.25m, ImageUrl = "img/pizzas/brit.jpg", }, new PizzaSpecial() { Id = 7, Name = "Veggie Delight", Description = "It's like salad, but on a pizza", BasePrice = 11.50m, ImageUrl = "img/pizzas/salad.jpg", }, new PizzaSpecial() { Id = 8, Name = "Margherita", Description = "Traditional Italian pizza with tomatoes and basil", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", }, new PizzaSpecial() { Id = 9, Name = "test", Description = "test", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", }, }; var dbDoughs = new DbDough[] { new DbDough { Name = "Thin Crust", Description = "Thinnest Dough in restaurant", Cost = 7, ImgSrc = "img/dough/Thin-Crust-Pizza-Dough.jpg" }, new DbDough { Name = "Flat Bread Crust", Description = "It is pretty flat", Cost = 6, ImgSrc = "img/dough/flatbreadcrust-dough.jpg" } }; var dbCheese = new DbCheese[] { new DbCheese { Name = "Mozzarella Cheese", Description = "It is from italy", Cost = 3 }, new DbCheese { Name = "Cheddar Chesse", Description = "Just Cheddar Chesse", Cost = 4 } }; var dbSausage = new DbSausage[] { new DbSausage { Name = "Kielbasa Sausage", Description = "Kielbasa", Cost = 8 }, new DbSausage { Name = "Italian Sausage", Description = "It is really import from Italy", Cost = 10 } }; db.Toppings.AddRange(toppings); db.Specials.AddRange(specials); db.SaveChanges(); db.Doughs.AddRange(dbDoughs); db.Cheeses.AddRange(dbCheese); db.Sausages.AddRange(dbSausage); db.SaveChanges(); }
// GET: /<controller>/ public IActionResult Index() { var specials = new PizzaSpecial[] { new PizzaSpecial() { Name = "Basic Cheese Pizza", Description = "It's cheesy and delicious. Why wouldn't you want one?", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", Description = "It has EVERY kind of bacon", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", Description = "It's the pizza you grew up with, but Blazing hot!", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", Description = "Spicy chicken, hot sauce and bleu cheese, guaranteed to warm you up", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", }, new PizzaSpecial() { Id = 5, Name = "Mushroom Lovers", Description = "It has mushrooms. Isn't that obvious?", BasePrice = 11.00m, ImageUrl = "img/pizzas/mushroom.jpg", }, new PizzaSpecial() { Id = 6, Name = "The Brit", Description = "When in London...", BasePrice = 10.25m, ImageUrl = "img/pizzas/brit.jpg", }, new PizzaSpecial() { Id = 7, Name = "Veggie Delight", Description = "It's like salad, but on a pizza", BasePrice = 11.50m, ImageUrl = "img/pizzas/salad.jpg", }, new PizzaSpecial() { Id = 8, Name = "Margherita", Description = "Traditional Italian pizza with tomatoes and basil", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", }, }; return(Ok(specials)); }
public static void Initialize(PizzaStoreConext 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.9m, 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 perperoni", Description = "Es la pizza con la que creciste, pero ardientemente deliciosa", BasePrice = 199.5m, ImageUrl = "images/pizzas/pepperoni.jpg" }, new PizzaSpecial { Name = "Amantes del champiñón", Description = "Tiene champiñones No es obvio?", BasePrice = 209.0m, ImageUrl = "images/pizzas/mushroom.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 = "Delicia vegetariana", Description = "Es como una ensalada pero en una pizza", BasePrice = 218.5m, ImageUrl = "images/pizzas/salad.jpg" }, new PizzaSpecial { Name = "Margarita", Description = "Pizza italiana tradicional con tomates y albahaca", BasePrice = 189.9m, ImageUrl = "images/pizzas/margherita.jpg" }, new PizzaSpecial { Name = "Hawaiana", Description = "De piña, jamón y queso.", BasePrice = 190.25m, ImageUrl = "images/pizzas/hawaiian.jpg" } }; var toppings = new Topping[] { new Topping { Name = "Queso extra", Price = 47.50m }, new Topping { Name = "Tocino de pavo", Price = 47.50m }, }; context.Specials.AddRange(specials); context.SaveChanges(); }
public static void Initialize(PizzaStoreContext db) { var toppings = new Topping[] { new Topping() { Name = "Допълнително сирене", Price = 1.50m, }, new Topping() { Name = "Американски бекон", Price = 1.99m, }, new Topping() { Name = "Британски бекон", Price = 1.99m, }, new Topping() { Name = "Канадски бекон", Price = 1.99m, }, new Topping() { Name = "чай с бисквити", Price = 3.00m }, new Topping() { Name = "Прясно изпечени котлети", Price = 3.50m, }, new Topping() { Name = "Камби", Price = 1.00m, }, new Topping() { Name = "Лук", Price = 1.00m, }, new Topping() { Name = "Гъби", Price = 1.00m, }, new Topping() { Name = "Пеперони", Price = 1.00m, }, new Topping() { Name = "Патешко месо", Price = 2.20m, }, new Topping() { Name = "Кюфтенца", Price = 1.50m, }, new Topping() { Name = "Омар", Price = 44.50m, }, new Topping() { Name = "Хайвер", Price = 80.75m, }, new Topping() { Name = "Артишок", Price = 2.40m, }, new Topping() { Name = "Пресни домати", Price = 0.50m, }, new Topping() { Name = "Босилек", Price = 0.50m, }, new Topping() { Name = "Пържола (medium-rare)", Price = 8.50m, }, new Topping() { Name = "Люти чушки", Price = 2.20m, }, new Topping() { Name = "Buffalo chicken", Price = 5.00m, }, new Topping() { Name = "Синьо сирене", Price = 1.50m, }, }; var specials = new PizzaSpecial[] { new PizzaSpecial() { Name = "Basic Cheese Pizza", Description = "Много вкусна. Защо не си вземеш една?", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", Description = "Има ВСЕКИ вид бекон", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", Description = "Пицата от твоето детство, но с повече люто!", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", Description = "Пикантно пилешко едно от най-добрите", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", }, new PizzaSpecial() { Id = 5, Name = "Mushroom Lovers", Description = "Има гъби.Очевидно", BasePrice = 11.00m, ImageUrl = "img/pizzas/mushroom.jpg", }, new PizzaSpecial() { Id = 6, Name = "Veggie Delight", Description = "Като салата, но върху пица", BasePrice = 11.50m, ImageUrl = "img/pizzas/salad.jpg", }, new PizzaSpecial() { Id = 7, Name = "Margarita", Description = "Традиционна италианска пица с домати и босилек", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", }, }; db.Toppings.AddRange(toppings); db.Specials.AddRange(specials); db.SaveChanges(); }
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(); }
public static void Initialize(PizzaStoreContext db) { var specials = new PizzaSpecial[] { new PizzaSpecial() { Name = "Basic Cheese Pizza", Description = "It's cheesy and delicious. Why wouldn't you want one?", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", Description = "It has EVERY kind of bacon", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", Description = "It's the pizza you grew up with, but Blazing hot!", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", Description = "Spicy chicken, hot sauce and bleu cheese, guaranteed to warm you up", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", }, new PizzaSpecial() { Id = 5, Name = "Mushroom Lovers", Description = "It has mushrooms. Isn't that obvious?", BasePrice = 11.00m, ImageUrl = "img/pizzas/mushroom.jpg", }, new PizzaSpecial() { Id = 7, Name = "Veggie Delight", Description = "It's like salad, but on a pizza", BasePrice = 11.50m, ImageUrl = "img/pizzas/salad.jpg", }, new PizzaSpecial() { Id = 8, Name = "Margherita", Description = "Traditional Italian pizza with tomatoes and basil", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", }, }; db.Specials.AddRange(specials); db.SaveChanges(); }
public static void Initialize(PizzaContext context) { if (context.Specials.Any()) { return; } 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 tomatos", 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 = "Basic Cheese Pizza", BasePrice = 9.99m, ImageUrl = "img/pizzas/cheese.jpg", Description = "It's cheesy and delicious. Why wouldn't you want one?", }, new PizzaSpecial() { Id = 2, Name = "The Baconatorizor", BasePrice = 11.99m, ImageUrl = "img/pizzas/bacon.jpg", Description = "It has EVERY kind of bacon", }, new PizzaSpecial() { Id = 3, Name = "Classic pepperoni", BasePrice = 10.50m, ImageUrl = "img/pizzas/pepperoni.jpg", Description = "It's the pizza you grew up with, but Blazing hot!", }, new PizzaSpecial() { Id = 4, Name = "Buffalo chicken", BasePrice = 12.75m, ImageUrl = "img/pizzas/meaty.jpg", Description = "Spicy chicken, hot sauce and bleu cheese, guaranteed to warm you up", }, new PizzaSpecial() { Id = 5, Name = "Mushroom Lovers", BasePrice = 11.00m, ImageUrl = "img/pizzas/mushroom.jpg", Description = "It has mushrooms. Isn't that obvious?", }, new PizzaSpecial() { Id = 6, Name = "The Brit", BasePrice = 10.25m, ImageUrl = "img/pizzas/brit.jpg", Description = "When in London...", }, new PizzaSpecial() { Id = 7, Name = "Veggie Delight", BasePrice = 11.50m, ImageUrl = "img/pizzas/salad.jpg", Description = "It's like salad, but on a pizza", }, new PizzaSpecial() { Id = 8, Name = "Margherita", BasePrice = 9.99m, ImageUrl = "img/pizzas/margherita.jpg", Description = "Traditional Italian pizza with tomatoes and basil", }, }; context.Toppings.AddRange(toppings); context.Specials.AddRange(specials); context.SaveChanges(); }
public static void Initialize(PizzaStoreContext db) { var toppings = new Topping[] { new Topping() { Name = "3 Slices Italian Napoli salami", Price = 1.50m, }, new Topping() { Name = "Speck ham", Price = 1.50m, }, new Topping() { Name = "Fennel sausage", Price = 1.50m, }, new Topping() { Name = "Chorizo", Price = 1.50m, }, new Topping() { Name = "Parma ham", Price = 1.50m }, new Topping() { Name = "Seared chicken breast", Price = 2.00m, }, new Topping() { Name = "Spicy Calabrian Nduja sausage", Price = 1.50m, }, new Topping() { Name = "Spicy Ventrica Salami", Price = 1.50m, }, new Topping() { Name = "Sweet peppadew peppers", Price = 1.00m, }, new Topping() { Name = "Chili rings", Price = 1.00m, }, new Topping() { Name = "Mushrooms", Price = 1.00m, }, new Topping() { Name = "Fillet peppers", Price = 1.00m, }, new Topping() { Name = "Rocket", Price = 0.75m, }, new Topping() { Name = "Lobster on top", Price = 64.50m, }, new Topping() { Name = "Served on a silver platter", Price = 25.00m, }, new Topping() { Name = "Courgettes", Price = 1.00m, }, new Topping() { Name = "Red onions", Price = 1.00m, }, new Topping() { Name = "Balsamic Glaze", Price = 0.50m, }, new Topping() { Name = "Parmesan", Price = 0.75m, } }; var specials = new PizzaSpecial[] { new PizzaSpecial() { Name = "Rustic Classic", Description = "Barrel & Stone tomato sauce and creamy Fior di latte mozarella", BasePrice = 5.50m, EightInchPrice = 5.75m, TwelveInchPrice = 8.75m, ImageUrl = "img/barrel-and-stone/rustic-classic-min.jpg", CanBeVegan = true, }, new PizzaSpecial() { Id = 2, Name = "Simply Salami", Description = "Italian Napoli Salami, Barrel & Stone tomato sauce and Fior di latte mozarella", BasePrice = 11.99m, EightInchPrice = 6.50m, TwelveInchPrice = 10.00m, ImageUrl = "img/barrel-and-stone/simply-salami-min.jpg", }, new PizzaSpecial() { Id = 3, Name = "The Works", Description = "Italian Napoli Salami, Smoked speck ham, black pepper and fennel sausage, Barrel and stone tomato sauce and Fior di latte mozarella", EightInchPrice = 7.00m, TwelveInchPrice = 11.50m, ImageUrl = "img/barrel-and-stone/the-works-min.jpg", }, new PizzaSpecial() { Id = 4, Name = "Sweet & Tangy", Description = "Barrel & Stone tomato sauce, Tangy goat's cheese, sweet peppadew peppers and pesto", EightInchPrice = 6.50m, TwelveInchPrice = 10.50m, ImageUrl = "img/barrel-and-stone/sweet-n-tangy-min.jpg", }, new PizzaSpecial() { Id = 5, Name = "Nice & Spicy", Description = "Spicy Calabrian Nduja sausage, Barrel & Stone tomato sauce, Fior di latte mozzarella, sweet peppadew peppers, fiery salami and chili peppers", EightInchPrice = 6.50m, TwelveInchPrice = 10.50m, ImageUrl = "img/barrel-and-stone/nice-n-spicy-min.jpg", }, new PizzaSpecial() { Id = 6, Name = "Gone Trufflin'", Description = "Decadent mushroom and black truffle paste, smoky speck ham, mushrooms, Fior di latte mozzarella", EightInchPrice = 6.50m, TwelveInchPrice = 10.50m, ImageUrl = "img/barrel-and-stone/gone-trufflin-min.jpg", }, new PizzaSpecial() { Id = 7, Name = "The Spaniard", Description = "Chorizo seasoned with paprika, herbs and garlic, Pecorino sheep cheese, Barrel & Stone tomato sauce, fillet peppers, Grana Padano Parmesan and sprinkles of oregano", EightInchPrice = 6.75m, TwelveInchPrice = 11.00m, ImageUrl = "img/barrel-and-stone/the-spaniard-min.jpg", }, new PizzaSpecial() { Id = 8, Name = "Rock The Parma", Description = "Barrel & Stone tomato sauce, Fior di latte mozarella, wild rocket, Parmigiano Reggiano and parma ham, topped with a dash of balsamic glaze", EightInchPrice = 6.50m, TwelveInchPrice = 10.50m, ImageUrl = "img/barrel-and-stone/rock-the-parma-min.jpg", }, new PizzaSpecial() { Id = 9, Name = "Skinny Fries", IsSide = true, EightInchPrice = 2.00m, ImageUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQrT6uE-WflbNGwfUNO5aouV-3z9e1aCKIX8JKz2HVVtVZpgji_&usqp=CAU" }, new PizzaSpecial() { Id = 10, Name = "Chicken & Pesto", Description = "A base of nutty green pesto stacked with crushed garlic, Fior di latte mozzarella, seared chicken breasts, capers and courgettes", EightInchPrice = 7.00m, TwelveInchPrice = 11.50m, ImageUrl = "img/barrel-and-stone/deliveroo-chicken-and-pesto.jpg" }, new PizzaSpecial() { Id = 11, Name = "The Garden Club (v, vg)", Description = "Barrel & Stone tomato sauce, crushed garlic, Fior di latte mozzarella, sweet red onions, courgettes, peppadew peppers finished with wild rocket and balsamic glaze", EightInchPrice = 6.75m, TwelveInchPrice = 11.00m, CanBeVegan = true, ImageUrl = "img/barrel-and-stone/deliveroo-the-garden-club.jpg" }, new PizzaSpecial() { Id = 12, Name = "Smoky Chilli Chicken", Description = "A smoky paprika covered base, topped with Barrel & Stone tomato sauce, Fior di latte mozzarella, seared chicken breasts and finished with some cheeky red chilli's", EightInchPrice = 7.00m, TwelveInchPrice = 11.50m, ImageUrl = "img/barrel-and-stone/deliveroo-smoky-chilli-chicken.jpg" }, new PizzaSpecial() { Id = 13, Name = "Garlic bread", Description = "Italian bread drizzled with garlic infused olive oil", EightInchPrice = 3.50m, IsSide = true, ImageUrl = "img/barrel-and-stone/garlicbread.jpg" }, new PizzaSpecial() { Id = 14, Name = "Garlic & Mozzarella", Description = "Italian bread drizzled with garlic infused olive oil, topped with Fior di latte mozzarella and balsamic glaze", EightInchPrice = 4.5m, IsSide = true, ImageUrl = "img/barrel-and-stone/garlic-mozz.png" }, new PizzaSpecial() { Id = 15, Name = "Sweet potato fries", EightInchPrice = 3.0m, IsSide = true, ImageUrl = "img/barrel-and-stone/sweet-potato.jpg" }, new PizzaSpecial() { Id = 16, Name = "Chunky chips", EightInchPrice = 2.0m, IsSide = true, ImageUrl = "img/barrel-and-stone/chunky-chips.jpg" }, new PizzaSpecial() { Id = 17, Name = "Mozarella sticks", EightInchPrice = 3.5m, IsSide = true, ImageUrl = "img/barrel-and-stone/mozzarella-sticks.jpg" }, new PizzaSpecial() { Id = 18, Name = "Breaded chicken goujons", EightInchPrice = 3.5m, IsSide = true, ImageUrl = "img/barrel-and-stone/goujons.jpg" }, new PizzaSpecial() { Id = 19, Name = "Spicy chicken bites ", EightInchPrice = 3.5m, IsSide = true, ImageUrl = "img/barrel-and-stone/spicy-chicken-bites.jpg" } }; var drinks = new Drink[] { new Drink { Id = 1, DrinkName = "Kopparberg non alcoholic strawberry and lime", ImageUrl = "https://imgix.bustle.com/uploads/image/2020/1/21/0c88a763-ecc7-49e2-af85-af507e2535bd-screen-shot-2020-01-21-at-15338-pm.png?w=646&fit=max&auto=format%2Ccompress&cs=srgb&q=70", Price = 2.50M }, new Drink { Id = 2, DrinkName = "Peroni large bottle", ImageUrl = "img/drinks/peroni.jpg", Price = 3.50m }, new Drink { Id = 3, DrinkName = "Bulmers large bottle", ImageUrl = "img/drinks/bulmers.jpg", Price = 2.50m, }, new Drink { Id = 4, DrinkName = "Diet Coke can", ImageUrl = "img/drinks/dietcoke.jpg", Price = 1.5m }, new Drink { Id = 5, DrinkName = "Coca cola can", ImageUrl = "img/drinks/coke.jpg", Price = 1.5m }, new Drink { Id = 6, DrinkName = "San Pellegrino Aranciata (orange)", Price = 1.5m, ImageUrl = "img/drinks/aranciata.jpg" }, new Drink { Id = 7, DrinkName = "San Pellegrino Limonata (lemonade)", ImageUrl = "img/drinks/limonata.jpg", Price = 1.5m, }, new Drink { Id = 8, DrinkName = "Fentimans rose lemonade", ImageUrl = "img/drinks/fentimans-rose.jpg", Price = 2.0m }, new Drink { Id = 9, DrinkName = "Fentimans lemonade", ImageUrl = "img/drinks/fentimans-lemon.jpg", Price = 2.0m }, new Drink { Id = 10, DrinkName = "Fentimans non-acoholic ginger beer", ImageUrl = "img/drinks/fentimans-gb.jpg", Price = 2.0m }, new Drink { Id = 11, DrinkName = "Coke Zero bottle", ImageUrl = "img/drinks/coke-zero.jpg", Price = 1.50m }, new Drink { Id = 12, DrinkName = "Prosecco single serve (187 ml)", ImageUrl = "img/drinks/prosecco.jpg", Price = 5.0m }, new Drink { Id = 13, DrinkName = "Pinot Grigio", ImageUrl = "img/drinks/pinotgrigio.jpg", Price = 10.0m }, new Drink { Id = 23, DrinkName = "Pinot Rose", ImageUrl = "img/drinks/pinot-rose.jpeg", Price = 10.0m }, new Drink { Id = 24, DrinkName = "Malbec", ImageUrl = "img/drinks/malbec.jpg", Price = 12.0m }, new Drink { Id = 25, DrinkName = "Budweiser", ImageUrl = "img/drinks/budweiser.jpg", Price = 2.50m }, new Drink { Id = 14, DrinkName = "New Zealand Sauvignon blanc", ImageUrl = "img/drinks/nz.jpg", Price = 12.0m }, new Drink { Id = 15, DrinkName = "Rioja rose", ImageUrl = "img/drinks/rioja-rose.jpg", Price = 10.0m }, new Drink { Id = 16, DrinkName = "Rioja white", ImageUrl = "img/drinks/rioja-white.jpg", Price = 10.0m }, new Drink { Id = 17, DrinkName = "Rioja red", ImageUrl = "img/drinks/rioja-red.jpeg", Price = 10.0m }, new Drink { Id = 18, DrinkName = "Sugarbird white zinfadel", ImageUrl = "img/drinks/sugarbird.jpg", Price = 10.0m }, //new Drink //{ // Id = 19, // DrinkName = "Spain Sauvignon blanc", // ImageUrl = "img/drinks/spain.jpg", // Price = 10.0m //}, new Drink { Id = 20, DrinkName = "Chile Sauvignon blanc", ImageUrl = "img/drinks/chile.jpg", Price = 10.0m, }, new Drink { Id = 21, DrinkName = "South Australian Chardonnay", ImageUrl = "img/drinks/australia.jpg", Price = 10.0m }, new Drink { Id = 22, DrinkName = "Australian shiraz", ImageUrl = "img/drinks/australia.jpg", Price = 10.0m } }; db.Toppings.AddRange(toppings); db.SaveChanges(); db.Specials.AddRange(specials); db.SaveChanges(); db.Drinks.AddRange(drinks); db.SaveChanges(); }