Ejemplo n.º 1
0
        //View existing Content by MealName
        private void DisplayContentbyMealName()
        {
            Console.Clear();
            //Prompt the user to give me a mealname
            Console.WriteLine("Enter the MealName of the content you would like to see");
            // Get the Users Input
            string MealName = Console.ReadLine();
            //find content by that MealName
            MenuContent content = _contentRepo.GetContentByMealName(MealName);

            //Display said content if not null
            if (content != null)
            {
                Console.WriteLine($"MealName: {content.MealName}\n" +
                                  $"Discription: {content.DescriptionType}\n" +
                                  $"IngredientList: {content.Ingredientlist}\n" +
                                  $"MealPrice: {content.MealPrice}\n" +
                                  $"TypeOfMeal: {content.TypeOfmeal}");
            }
            else
            {
                Console.WriteLine("No content by that MealName");
            }
        }