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&n
read more »
Be the first to post a Comment!