public async Task <ActionResult> DeleteIngredientAsync(int ingredientId)
        {
            var ingredientFromRepo = await _ingredients.GetAsync(ingredientId);

            if (ingredientFromRepo == null)
            {
                return(NotFound());
            }

            _ingredients.Delete(ingredientFromRepo);
            await _ingredients.SaveAsync();

            return(NoContent());
        }
 public void Delete(Ingredient ingredient)
 {
     _dal.Delete(ingredient);
 }
 public async Task <int> Delete(int id)
 {
     return(await _ingredientsRepository.Delete(id));
 }