Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Recipes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRecipes(Recipe recipe)
 {
     base.AddObject("Recipes", recipe);
 }
Exemplo n.º 4
0
 public void Add(Recipe recipe)
 {
     RefinedRecipes.Add(recipe);
 }