Ejemplo n.º 1
0
        public static void Update()
        {
            DishModelCollection.Clear();
            EsaDbContext db = new EsaDbContext();

            foreach (var e in db.DishList)
            {
                DishModelCollection.Add(new DishModel(e));
            }
        }
Ejemplo n.º 2
0
        public DishViewModel()
        {
            EsaDbContext db = new EsaDbContext();

            foreach (var e in db.CategoriesList)
            {
                CategoriesCollection.Add(e);
            }
            foreach (var e in db.DishList)
            {
                DishModelCollection.Add(new DishModel(e));
            }
        }