public string Convert(Recipe recipe) { StringBuilder sb = new StringBuilder(); sb.Append(recipe.Title + " "); foreach (Ingredient ingre in recipe.Ingredients) { sb.Append(ingre + " "); } sb.Append(recipe.Comment); sb.Append(recipe.Directions); sb.Append(recipe.RecipeType); sb.Append(recipe.ServingSize); sb.Append(recipe.Yield); return sb.ToString(); }
/// <summary> /// Create a new Recipe object. /// </summary> /// <param name="recipeID">Initial value of the RecipeID property.</param> /// <param name="title">Initial value of the Title property.</param> /// <param name="directions">Initial value of the Directions property.</param> /// <param name="recipeType">Initial value of the RecipeType property.</param> public static Recipe CreateRecipe(global::System.Int32 recipeID, global::System.String title, global::System.String directions, global::System.String recipeType) { Recipe recipe = new Recipe(); recipe.RecipeID = recipeID; recipe.Title = title; recipe.Directions = directions; recipe.RecipeType = recipeType; return recipe; }
/// <summary> /// Deprecated Method for adding a new object to the Recipes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRecipes(Recipe recipe) { base.AddObject("Recipes", recipe); }
public void Add(Recipe recipe) { RefinedRecipes.Add(recipe); }