Using an IQueryable in another IQueryable

…衆ロ難τιáo~ 提交于 2019-12-02 04:04:06

Problem is not IQueryable inside IQueryable, because you can include subqueries just not the way you did.

In your example whole Select is represented as expression tree. In that expression tree there is something like :

CALL method DBEntitiesCompanyExtensions.GetCompanyProducts

Now EF should somehow traslate this into SQL SELECT statement. It cannot do that, because it cannot "look inside" GetCompanyProducts method and see what is going on there. Nor can it execute this method and do anything with it's result. The fact it returns IQueryable does not help and is not related.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!