Published on

Beware of entity tracking

Authors
  • avatar
    Name
    Mike Barram
    Twitter

Entity tracking is clever and manages to keep a cache of recently used entities (and lists of entities) and, if it doesn’t see a change to an entity, it will return the cached version without going to the database – that’s what caching is after all. The problem is that ALL changes to the database MUST be made by the same project using .netTiers methods. If you’re developing an application and change data directly in the database then .netTiers won’t spot that. Pretty obvious really but do remember whether you have
enableEntityTracking="true" or
enableEntityTracking="false"
in the SqlNetTiersProvider bit of your web.config