static void Main(string[] args) { string connectionString = ConfigurationManager.ConnectionStrings["LocalConnection"].ConnectionString; var db = new VendingDBService(connectionString); var log = new LogFileService(); VendingMachine vm = new VendingMachine(db, log); VendingMachineCLI cli = new VendingMachineCLI(vm); cli.Run(); }
static void Main(string[] args) { string directory = Directory.GetCurrentDirectory(); directory += @"..\..\..\..\..\etc"; string fileName = "vendingmachine.csv"; string fullPath = Path.Combine(directory, fileName); VendingMachine machine = new VendingMachine("Vendo - Matic 600", fullPath); machine.StockMachine(); machine.InitializeUnitsSold(); VendingMachineCLI machineCLI = new VendingMachineCLI(machine); machineCLI.MainMenu(); }