public Recipe InsertRecipe(Recipe r) { db.Recipes.Add(r); db.SaveChanges(); DetatchData(r); var newR = db.Recipes.Where(s => s.RecipeID == r.RecipeID).FirstOrDefault(); return(newR); }
public Ingredient InsertIngredient(Ingredient i) { db.Ingredients.Add(i); db.SaveChanges(); return(i); }