Example #1
0
 public StoreByIDViewModel(int id)
 {
     db             = new EnzglyStoreEntities();
     ItemCollection = new ObservableCollection <Item>();
     StoreId        = id;
     FillStoreGrid();
 }
Example #2
0
        // public ICommand ButtonCommand { get; private set; }

        public Window1ViewModel()
        {
            db = new EnzglyStoreEntities();
            var Stores = db.Stores.ToList();

            StoresCollection = new ObservableCollection <Entities.Store>();
            foreach (var item in Stores)
            {
                StoresCollection.Add(item);
            }
            _canExecute = true;
        }
 public MainWindoViewModel()
 {
     db = new EnzglyStoreEntities();
     StoresCollection = db.Stores.ToList();
 }