Repository Pattern – MVC storefront

asp.net-mvclinqrepository-pattern

Have been looking at the MVC storefront and see that IQueryable is returned from the repository classes. Wondering if you are not using LINQ does it makes sense to return that object? In the case of LINQ in makes sense because of deferred execution, so adding filtering in the service layer makes sense, but if you don't use LINQ you would want to filter in the DB in many cases. In this case would I just add methods that do the filtering to the repository? If I do, is the service layer really useful?

Best Answer

Arguments can be made either way, see this recent blog posting: Should my repository expose IQueryable?