/// <summary> /// Method adds a food product in out foodProduct list /// </summary> private void AddFoodProduct() { Console.WriteLine("\nEnter the name of product:"); FoodProduct foodProduct = new FoodProduct(); foodProduct.Name = Console.ReadLine(); foodProductController.AddItem(foodProduct); foodProductList.Add(foodProduct); }
/// <summary> /// Method collect an information about our recipe and adds it into our recipe list /// </summary> private void AddRecipe() { Console.Clear(); ingredients = new List <RecipeIngredient>(); steps = new List <CookingStep>(); subcategoryId = 0; Recipe recipe = new Recipe(); Console.WriteLine("Enter the name of recipe:"); string recipeName = Console.ReadLine(); EnterRecipeCategory(); EnterRecipeSubCategory(); EnterRecipeIngredients(); EnterRecipeSteps(); recipe.Name = recipeName; recipe.RecipeBookCategoryId = categoryId; recipe.RecipeBookSubcategoryId = subcategoryId; recipe.Ingredients = ingredients; recipe.Steps = steps; recipeController.AddItem(recipe); flag = true; }