Link:
My repositories always returns IQueryable. The reason for this is that IQueryable is not dependent on EF whereas ObjectQuery is. So if I want my other layers to be persistance ignorant I don't want to introduce dependency on ObjectQuery.
a) I assume reason why repositories ( implemented using EF ) should return IQueryable
instead of ObjectQuery
is because other ORMs also use queries which return IQueryable
, and by having repositories return IQueryable
we can easily switch between EF and other ORMs, without having to change the public interface of a repository?
b) Besides EF and NHibernate, are there any other ORMs that also have queries which return IQueryable
?
Thank you