/// <summary> /// Method to add an ingredient to the database /// </summary> /// <param name="ingredient">The name of the ingredient</param> /// <returns></returns> public async Task AddIngredient(TextBox ingredient) { var isValid = ValidationObject.ValidateIngredientName(ingredient); if (isValid) { var ingredientToAdd = new IngredientDTO() { Name = ingredient.Text }; var added = await BusinessObject.AddIngredientAsync(ingredientToAdd); if (added) { ShowMessage($"Ingredient {ingredientToAdd.Name} Added"); } else { ShowMessage($"Ingredient {ingredientToAdd.Name} Not Added"); } } }