//move payment logic to dedicated classes. public MainViewModel() { _drinkFactory = new DrinkFactory(); _coffeeStrength = Strength.Normal; _sugarAmount = Amount.Normal; _milkAmount = Amount.Normal; LogText = new ObservableCollection <string>(); LogText.Add("Starting up..."); LogText.Add("Done, what would you like to drink?"); var repository = new TeaRepository(); //TeaNames = new ObservableCollection<string>(repository.GetTeaNames()); _cashOnCards = new Dictionary <string, double> { ["Arjen"] = 5.0, ["Bert"] = 3.5, ["Chris"] = 7.0, ["Daan"] = 6.0 }; PaymentCardUsernames = new ObservableCollection <string>(_cashOnCards.Keys); SelectedPaymentCardUsername = PaymentCardUsernames[0]; }
public UnitOfWork(MyDatabase context) { this.context = context; Cares = new CareRepository.CareRepository(context); FaceCreams = new FaceCreamRepository(context); Hairs = new HairRepository(context); Lotions = new LotionRepository(context); ShaveBeards = new ShaveBeardRepository(context); FoodHerbs = new FoodHerbRepository(context); Salts = new SaltRepository(context); Spices = new SpiceRepository(context); SproutingSeeds = new SproutingSeedRepository(context); Teas = new TeaRepository(context); Candles = new CandleRepository(context); EssentialOils = new EssentialOilRepository(context); Homes = new HomeRepository.HomeRepository(context); HomeCleanings = new HomeCleaningRepository(context); Kitchens = new KitchenRepository(context); PowerHealths = new PowerHealthRepository(context); SuperFoods = new SuperFoodRepository(context); Supplements = new SupplementRepository.SupplementRepository(context); Orders = new OrderRepository(context); Products = new ProductRepository(context); Users = new UserRepository(context); }