Ejemplo n.º 1
0
 private static bool IngredientCanContainAllergen(Problem problem, Ingredient ingredient, Allergen allergen)
 {
     return(problem.Foods
            .Where(food => food.Allergens.Contains(allergen))
            .All(food => food.Ingredients.Contains(ingredient)));
 }