public void InsertIngredientForRecipe(int idRecipe, int idIngredient, string quantity) { var ingredientforRecipeDAL = new IngredientsRecipe() { RecipeID = idRecipe, IngredientID = idIngredient, IngredientQuantity = quantity }; ingredientsRecipeRepository.Create(ingredientforRecipeDAL); }
public void Update(IngredientsRecipeBL ingredient) { var id = CheckIfIngredientExists(ingredient.Name); var ingredientDAL = new IngredientsRecipe() { IngredientID = id, RecipeID = ingredient.RecipeID, IngredientQuantity = ingredient.Quantity, IngredientsRecipeID = ingredient.IngredientsRecipeID, }; ingredientsRecipeRepository.Update(ingredientDAL); }