Пример #1
0
        //Delete existing content
        private void DeleteExistingMenuItems()
        {
            DisplayAllMenuItems();

            //Get the title they want to remove
            Console.WriteLine("\nEnter the meal you would like to remove:");

            string input = Console.ReadLine();

            //Call the delete method
            bool wasDeleted = _menuItemsRepo.RemoveMenuItemFromList(input);

            //If the content was deleted , say so
            if (wasDeleted)
            {
                Console.WriteLine("The menu item was deleted.");
            }
            else
            {
                Console.WriteLine("The menu item could not be deleted.");
            }

            //Otherwise state it couldn't be deleted
        }