How can i convert a DBQuery to an ObjectQuery?

后端 未结 3 1399
长发绾君心
长发绾君心 2020-12-07 01:03

I\'ve got a DBQuery which converts to an IQueryable (this bit works fine). But then I\'m trying to convert the IQueryable to an O

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 01:33

    DbQuery contains Include method so you don't need to convert to ObjectQuery. ObjectQuery is not accessible from DbQuery instance - it is wrapped in internal type InternalQuery and conversion operator is not defined.

    Btw. when you add using System.Data.Entity and refrence CTP5 you will be able to call Include on IQueryable!

提交回复
热议问题