Currently, when DLinq retrieves entities, it automatically inserts them in an identity cache. This ensures that if you run two queries whose results overlap, you get the same objects by reference – not copies. The object reference after all is the identity in CLR world. This ensures that when you change an entity, you don’t need to worry about which copy you are changing – there is only one. So update anomalies can be avoided. This comes at some minimal cost – hashing the object ref and maintaining the reference.
Of course, if you retrieve a projection – as a named, non-entity type or an anonymous type, you bypass the id cache and get read-only objects with no id enforcement.
So the questions are:
Is it interesting for you to get a stream of objects without id enforcement?
It makes sense if you can answer both the questions below affirmatively:
Do you have common, read-only and perhaps stream-only processing that you do with objects?
Do you need to use the entity types and cannot work with a projection or even the underlying DataReader (both give you an extra ounce of perf with less functionality)?