Ejemplo n.º 1
0
        // Get the Dish for Time Of Day with Dish Type
        public Dish GetDish(DishConstant.TimeOfDay timeOfDay, DishConstant.DishType dishType)
        {
            if (dishes != null)
            {
                var dish = dishes.DishList.FirstOrDefault(x => x.dishType == dishType && x.TimeOfDay == timeOfDay);
                if (dish == null)
                {
                    dish = new Dish();
                    dish.dishName = "error";
                }
                return dish;
            }

            var dish1 = new Dish();
            dish1.dishName = "error";
            return dish1;
        }
Ejemplo n.º 2
0
 public string GetDish(DishConstant.TimeOfDay timeOfDay, DishConstant.DishType dishType)
 {
     var dishService = new DishService();
     return dishService.GetDish(timeOfDay, dishType).dishName;
 }
Ejemplo n.º 3
0
 public Dish(DishConstant.DishType dishType, DishConstant.TimeOfDay timeOfDay, string dishName)
 {
     this.dishType = dishType;
     this.TimeOfDay = timeOfDay;
     this.dishName = dishName;
 }