public void Menu() { PrintWelcome(); bool quit = false; while (!quit) { PrintMainMenu(); var key = Console.ReadLine(); Console.WriteLine(); switch (key.ToUpper()) { case ("1"): CustomerMenu.Menu(); break; case "2": ProductMenu.Menu(); break; case "Q": case "C": quit = true; break; } } }
public MainMenu(bool useLocalDB) { if (useLocalDB) { _db = new DatabaseManager(); } else { _db = CreateAzureDBConnection(); } CustomerMenu = new CustomerMenu(_db, this); ProductMenu = new ProductMenu(_db, this); CategoryMenu = new CategoryMenu(_db, this); }