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); } }
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); } }
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); } }