Ejemplo n.º 1
0
 public Dish(int id, string name, decimal weight, decimal price, Layots layot, RecipeDish recipe, string kitchen)
 {
     Name       = name;
     Weight     = weight;
     Price      = price;
     LayoutDish = layot;
     RecipeDish = recipe;
     Kitchen    = kitchen;
 }
Ejemplo n.º 2
0
 public Dish(DishEnt dish)
 {
     Id         = dish.Id;
     Name       = dish.Name;
     Weight     = dish.Weight;
     Price      = dish.Price;
     LayoutDish = new Layots(dish.LayoutDish);
     RecipeDish = new RecipeDish(dish.RecipeDish);
     Kitchen    = dish.Kitchen;
 }
Ejemplo n.º 3
0
        List <RecipeDish> DishesOutpoot()
        {
            List <RecipeDishEnt> recipeDishEnts = Unit.RecipesRepository.AllItems.ToList();
            List <RecipeDish>    recipeDishes   = new List <RecipeDish>();

            foreach (var p in recipeDishEnts)
            {
                Dish       dish   = new Dish(p.Dish.Id, p.Dish.Name, p.Dish.Weight, p.Dish.Price, new Layots(p.Dish.LayoutDish), new RecipeDish(p.Dish.RecipeDish), p.Dish.Kitchen);
                RecipeDish recipe = new RecipeDish(p.Id, p.Recipe, new Dish(p.Dish));
                recipeDishes.Add(recipe);
            }
            return(recipeDishes);
        }