Ejemplo n.º 1
0
        public static Pizza CreatePizza(DtoPizza dtoPizza)
        {
            var pizza = new Pizza()
            {
                Name  = dtoPizza.Name,
                Photo = dtoPizza.Photo,
                Collection_Ingredient = dtoPizza.Collection_Ingredient
            };

            return(pizza);
        }
Ejemplo n.º 2
0
        public static Pizza Create(DtoPizza dato, IEnumerable <Ingredient> ingredients)
        {
            var pizza = new Pizza()
            {
                Name        = dato.Name,
                Picture     = dato.Picture,
                FormItem    = dato.FormItems,
                Ingredients = ingredients.ToList()
            };

            return(pizza);
        }