开发者

Expression for children entitySet parent properties

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 typ开发者_C百科e 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜