public Ingredient(Recipe recipe, FoodItem fooditem) { this.recipe = recipe; this.data = new IngredientDO(); data.AmountSelectedDB = fooditem.NewEntryAmount.ToStorageString(); data.AmountScaleDB = 1; data.ItemId = fooditem.GetItemId(); this.item = fooditem; item.NotifyIngredients.Add(this); data.OrderId = recipe.MaxOrderId + 1; data.RecipeId = recipe.GetFoodItemId(); }
public Ingredient(Recipe recipe, IngredientDO data) { this.recipe = recipe; this.data = data; }