Beispiel #1
0
        public static void AddOption()
        {
            Console.WriteLine(divider);
            Console.WriteLine("Let's add a menu item.");
            string name  = Input("Give the menu item a name: ");
            string desc  = Input("Give the menu item a short description: ");
            double price = Math.Round(double.Parse(Input("Give the menu item a price (no dollar signs!): ")), 2);

            Console.WriteLine(divider);
            List <string> ingredients = AddIngredients();

            Console.WriteLine(divider);

            MenuRepository.AddMenuItem(new MenuItem(name, desc, price, ingredients));

            Console.WriteLine($"{name} has been added to the menu.");
            Input("Press enter/return ");
        }