views:

37

answers:

1

I need to build an expression that will work on a parent entity properties so will do the following:

IQueryable<Children> allChildren = from e in context.Children select e;

IQueryable<Children> filter = allChildren.Where(x => x.Parent.Name == "Value"); 

I created an expression of type Expression.Lambda<Func<Parent, bool>> for that but I cannot use it on Children 'Where', no suitable overload. How to accomplish this? Children are entity set of a parent.

A: 

I figured that nested expression is what I need here and it's working fine

Victor