/// <summary> /// Method to delete an ingredient /// </summary> /// <param name="ingredient">The ingredient to delete</param> public async Task DeleteIngredientAsync(ComboBox ingredient) { var isValid = ValidationObject.ValidateIngredientSelection(ingredient); if (isValid) { var ingredientToDelete = ingredient.SelectedItem as IngredientDTO; var deleted = await BusinessObject.DeleteIngredientAsync(ingredientToDelete); if (deleted) { ShowMessage($"Recipe {ingredientToDelete.Name} Deleted Successfully"); } else { ShowMessage($"Recipe {ingredientToDelete.Name} Not Deleted"); } } }