public Pizza() { Toppings = new List <Topping>(); Crust = new Crust("Hand Tossed"); Size = new Size("Medium"); Name = "Custom"; }
public CustomPizza(List <string> size, List <string> crust, List <Toppings> toppings, int price) { Size.AddRange(size); Crust.AddRange(crust); Toppings.AddRange(toppings); Price = price; }
//constructors public Pizza(Size size, Crust crust, List <Toppings> toppings, int price) { Size = size; Crust = crust; Toppings = toppings; Price = price; }
public void Create(domain.Crust crust) { var newCrust = new Crust(); _db.Crust.Add(newCrust); newCrust.Name = crust.Name; _db.SaveChanges(); }
public Pizza(string name, List <Topping> toppings, Crust crust, Size size, double price) { Name = name; Toppings = toppings; Crust = crust; Size = size; Price = price; }
public void CreatePizza(string name, List <Topping> toppings, Crust crust, Size size, double basePrice) { if (Pizzas.Count < 50) { Pizza newPizz = new Pizza(name, toppings, crust, size, basePrice); if (GetTotalPrice() + newPizz.GetTotalPrice() < 250) { Pizzas.Add(newPizz); } } }
public Pizza(List <Topping> toppings, Crust crust, Size size, string name) { if (toppings.Count >= 6) { //Should never get here unless failed to handle in console app throw new System.Exception("Topping Overload! Too many toppings added to pizza."); } else { Toppings = toppings; Crust = crust; Size = size; Name = name; } }
public Pizza(Pizza pizza) { Name = pizza.Name; Toppings = new List <Topping>(); foreach (Topping top in pizza.Toppings) { Toppings.Add(top); } Crust = new Crust { CrustName = pizza.Crust.CrustName, Price = pizza.Crust.Price }; Size = new Size { SizeName = pizza.Size.SizeName, Price = pizza.Size.Price }; Price = pizza.Price; }
public Pizza(Crust c, Size s, List <Toppings> t) { crust = c; size = s; toppings.AddRange(t); }
public void CreatePizza(Size size, Crust crust, List <Toppings> toppings, int price) { Pizzas.Add(new Pizza(size, crust, toppings, price)); }
public void AddCrust(Crust crust, Pizza pizza) { pizza.Crust = crust; }
public void AddCrust(string crust) { Crust.Add(crust); }
public void CreatePizza(Size s, Crust c, List <Toppings> t) { var pizza = new Pizza(c, s, t); Pizzalist.Add(pizza); }
public Pizza(string name, Size size, Crust crust) { Name = name; Size = size; Crust = crust; }