Exemplo n.º 1
0
 private Pizza(PizzeriaId pizzeriaId, string name, decimal price, List <string> ingredients)
 {
     Id           = new PizzaId(Guid.NewGuid());
     PizzeriaId   = pizzeriaId;
     Name         = name;
     _price       = price;
     _ingredients = string.Join(",", ingredients);
 }
Exemplo n.º 2
0
 private Pizza GetPizza(PizzaId pizzaId)
 {
     return(_pizzas.SingleOrDefault(x => x.Id.Equals(pizzaId)));
 }
Exemplo n.º 3
0
        public void EditPizzaIngredients(PizzaId pizzaId, string ingredients)
        {
            var pizza = GetPizza(pizzaId);

            pizza.EditIngredient(ingredients);
        }