Ejemplo n.º 1
0
        //View existing item by meal name
        public void DisplayItemByMealName()
        {
            Console.Clear();
            Console.WriteLine("Enter the name of the menu item you would like to see:");
            string   mealName = Console.ReadLine();
            MenuItem item     = _itemRepo.GetItemByMealName(mealName);

            if (item != null)
            {
                Console.WriteLine($"Meal Name: {item.MealName}\n" +
                                  $"Description: {item.MealDesciption}\n" +
                                  $"Meal Number: {item.MealNumber}\n" +
                                  $"List of ingredients: {item.ListOfIngredients}\n" +
                                  $"Price: {item.Price}");
            }
            else
            {
                Console.WriteLine("No item by that meal name.");
            }
        }