【发布时间】:2011-01-31 18:37:38
【问题描述】:
我在查询表中的前 50 行时收到此错误消息。我的项目使用 Entity Framework 4 CTP 5 POCO:
Unable to cast object of type 'System.Data.Entity.Infrastructure.DbQuery' to type 'System.Linq.IQueryable`1[Lib.Model.Post]'
我的模型基于这个答案:Entity Framework 4 CTP 4 / CTP 5 Generic Repository Pattern and Unit Testable
知道如何解决这个错误吗?
谢谢。
【问题讨论】:
-
您需要提供更多上下文。就目前而言,我可以发挥惊人的克雷斯金并尝试创造所有可能性。围绕错误的代码是什么。
标签: entity-framework-4 poco odata wcf-data-services