I got this error message while querying the top 50 row in a table. My project uses 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]'
My Models was based on this answer: Entity Framework 4 CTP 4 / CTP 5 Generic Repository Pattern and Unit Testable
Any idea on how to fix this error?
Thanks.