public async void AddProduct(SelectableProduct prod) { IngredientModel ingredient = new IngredientModel { ProductName = prod.Product.Name, ProductId = prod.Product.Id, UnitQuantity = prod.CurrentUnitQuantityTypeVolume, UnitQuantityType = prod.UnitQuantityType, RecipeId = RecipeId }; await RecipeService.InsertIngredient(ingredient); await OnIngredientAdded.InvokeAsync(ingredient); prod.IsAdding = false; }
public void SetIsAdding(SelectableProduct cnt) { Products.ForEach(p => p.IsAdding = false); cnt.IsAdding = true; }