Example #1
0
        public bool DeleteIngredient(int ingredientId)
        {
            bool ingredientDeleted = false;

            try
            {
                if (ingredientId > 0)
                {
                    IngredientDAL ingredientDAL = new IngredientDAL();
                    ingredientDeleted = ingredientDAL.DeleteIngredient(ingredientId);
                }
                else
                {
                    throw new RecipeIngredientSystemExceptions("Invalid Ingredient ID");
                }
            }
            catch (RecipeIngredientSystemExceptions)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(ingredientDeleted);
        }