private void LoadDishMenu()
        {
            IDataService ds     = new XmlDataService();
            var          dishes = ds.GetAllDishes();

            this.DishMenu = new List <DishMenuItemViewModel>();
            foreach (var dish in dishes)
            {
                DishMenuItemViewModel item = new DishMenuItemViewModel();
                item.Dish = dish;
                this.DishMenu.Add(item);
            }
        }
Ejemplo n.º 2
0
        private void LoadDishMenu()
        {
            XmlDataService xmlData = new XmlDataService();
            var            dishes  = xmlData.GetAllDishes();

            this.DishMenu = new List <DishMenuItemViewModel>();
            foreach (var dish in dishes)
            {
                DishMenuItemViewModel dishMenuModel = new DishMenuItemViewModel()
                {
                    dish = dish
                };
                DishMenu.Add(dishMenuModel);
            }
        }
Ejemplo n.º 3
0
 private void LoadDishMenu()
 {
     IDataService ds = new XmlDataService();
     var dishes = ds.GetAllDishes();
     this.DishMenu = new List<DishMenuItemViewModel>();
     foreach (var dish in dishes)
     {
         DishMenuItemViewModel item = new DishMenuItemViewModel();
         item.Dish = dish;
         this.DishMenu.Add(item);
     }
 }