internal Ingredient GetOne(int id) { Ingredient ingredient = _repo.GetOne(id); if (ingredient == null) { throw new Exception("invalid id"); } return(ingredient); }