Example #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);
 }
Example #2
0
 private Pizzeria(string name)
 {
     Id      = new PizzeriaId(Guid.NewGuid());
     _name   = name;
     _pizzas = new List <Pizza>();
 }
Example #3
0
 internal static Pizza CreateNew(PizzeriaId pizzeriaId, string name, decimal price, List <string> ingredients)
 {
     return(new Pizza(pizzeriaId, name, price, ingredients));
 }