Exemplo n.º 1
0
 /// <summary>
 /// Detach the entity from cache
 /// </summary>
 internal void DetachCache()
 {
     this._entityChangedHandler = null;
     this._cacheEntry           = null;
     this._entityKey            = null;
     //TODO:this.Relationships.DetachContext();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Attach the entity to cache
 /// </summary>
 /// <param name="cacheEntry"></param>
 /// <param name="changed"></param>
 internal void AttachCache(EntityCacheEntry cacheEntry, EntityChangedHandler changed)
 {
     if (this._cacheEntry != null)
     {
         throw new InvalidOperationException("Entity cannot exist in multiple object caches");
     }
     this._cacheEntry           = cacheEntry;
     this._entityChangedHandler = changed;
 }