public MainViewModel(MyDbContext db)
        {
            this.db = db;

            //View Models
            customerViewModel = new CustomerViewModel(db);
            resourceViewModel = new ResourceViewModel(db);
            orderViewModel    = new OrderViewModel(db);

            recipeViewModel = new RecipeViewModel(db);
        }
Beispiel #2
0
        public MainViewModel(MyDbContext db, Window addResourceToRecipeWindow)
        {
            this.db = db;
            this.addResourceToRecipeWindow = addResourceToRecipeWindow;

            //View Models
            customerViewModel = new CustomerViewModel(db);
            resourceViewModel = new ResourceViewModel(db);
            orderViewModel    = new OrderViewModel(db);

            recipeViewModel = new RecipeViewModel(db, addResourceToRecipeWindow);
        }