public void DeleteRecipe(RecipeItem recipe)
        {
            RecipeItem dbEntry = context.Recipes.FirstOrDefault(p => p.RecipeId == recipe.RecipeId);

            if (dbEntry != null)
            {
                context.Recipes.Remove(dbEntry);
                context.SaveChanges();
            }
        }
        public void SaveRecipe(RecipeItem recipe)
        {
            RecipeItem dbEntry = context.Recipes.FirstOrDefault(p => p.RecipeId == recipe.RecipeId);

            if (dbEntry != null)
            {
                dbEntry.RecipeName   = recipe.RecipeName;
                dbEntry.ServingSize  = recipe.ServingSize;
                dbEntry.Description  = recipe.Description;
                dbEntry.Instructions = recipe.Instructions;
            }
            context.SaveChanges();
        }
 public static void AddRecipe(RecipeItem recipe)
 {
     recipes.Add(recipe);
 }
 public void AddRecipe(RecipeItem recipe)
 {
     context.AttachRange(recipe);
     context.SaveChanges();
 }