Exemplo n.º 1
0
 private void DeRef()
 {
     lock (_lock)
     {
         _refCount -= 1;
         if (_refCount == 0)
         {
             if (_connection != null && _connection.State != ConnectionState.Closed)
             {
                 _connection.Close();//Dispose
             }
             _ctxStorage.Remove(_dbConnectionString);
         }
     }
 }