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