protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         this.CloseOwnedConnection();
     }
     this._connection = null;
     this._workspace  = null;
     this._cache      = null;
 }
 public ExtensibleObjectCache(DataModelWorkspace workspace)
 {
     if (workspace == null)
     {
         throw new ArgumentNullException("workspace");
     }
     this._workspace            = workspace;
     this._addedEntityStore     = new Dictionary <EntityKey, EntityCacheEntry>();
     this._deletedEntityStore   = new Dictionary <EntityKey, EntityCacheEntry>(); this._addedEntityStore = new Dictionary <EntityKey, EntityCacheEntry>();
     this._modifiedEntityStore  = new Dictionary <EntityKey, EntityCacheEntry>();
     this._unchangedEntityStore = new Dictionary <EntityKey, EntityCacheEntry>();
 }
 public ExtensibleObjectContextBase(DbConnection connection, DataModelWorkspace workspace)
 {
     this._connection = connection;
     this._workspace  = workspace;
     //determine connection ownership
     if (this._connection == null)
     {
         this._ownConnection = false;
     }
     else
     {
         this._ownConnection = this._connection.State == ConnectionState.Closed;
         if (this._ownConnection)
         {
             this._connectionOpenedByContext = false;
         }
     }
 }
Exemple #4
0
 public ExtensibleObjectContext(DbConnection connection, DataModelWorkspace workspace)
     : base(connection, workspace)
 {
 }