public static void Main() { GoodsRepository goods = new GoodsRepository(); goods.Goods = new Good[] { new Good() { Name = "Test1", Count = 2, Price = 10 }, new Good() { Name = "Test2", Count = 3, Price = 15 }, new Good() { Name = "Test3", Count = 2, Price = 2 } }; WendingMachine machine = new WendingMachine(1000, goods); WendingMachine machine2 = new WendingMachine(1000, goods); WendingMachineGUI gui = new WendingMachineGUI(); gui.Machine = machine; while (true) { gui.Update(); } }
public WendingMachineDto GetMachineById(int machineId) { WendingMachine machine = _wendingMachineRepository.GetMachineById(machineId); return(Mapper.Map <WendingMachineDto>(machine)); }
public WendingMachineDto GetMachineByBalance(decimal balance) { WendingMachine machine = _wendingMachineRepository.GetMachineByBalance(balance); return(Mapper.Map <WendingMachineDto>(machine)); }