Entity Framework - Too high level of nesting for select

entity, frameworks, linq, mysql

Solution

I have fixed the problem by my self, the fix was in the where, i replaced it with:

where recipeIDs.Contains(ri.RecipeID)

Problem

Hello stackoverflow i am having trouble with a LINQ query. ``` from ri in App.db.RecipeIngredients join i in App.db.Ingredients on ri.IngredientID equals i.ID join r in App.db.Recipes on ri.RecipeID equals r.ID where recipeIDs.Any(rid => rid == ri.RecipeID) group new Result() { recipe = ri.Recipe, ingredient = ri.Ingredient, quantity = ri.Quantity } by ri.RecipeID ``` This is the code that i have made so far, the recipeIDs is a list of ints. but when the recipeIDs list exceeds 30 ints the program breaks with the error "Too high level of nesting for select", i have been googleing, but at this point i have no idea how to fix it. can some of you help me?

Original source