Most will recommend caching as a list. I know that is a solution and may be the one I go with. But, what if one wants to be able to treat a cached linq-to-sql with full IQueryable (IEnumerable?) functionality?
If one does try to cache the raw result, an error "Query results cannot be enumerated more then once".
So, to make clear my questions are:
- Is the hashcode for Lists, IQueryable, and IEnumerable unique?
- If I want to cache the linq-to-sql result safely AND provide for maximum functionality afterward, how can I do that?