示例#1
0
        public void Dispose()
        {
            using (DataServer database = new ReferenceServer())
            {
                database.Dispose();

                // Should be ok to dispose an already disposed database.
                database.Dispose();
            }
        }
示例#2
0
        private ReferenceServer GetDatabase(Boolean refresh = false)
        {
            if (_database.IsNull() || refresh)
            {
                if (_database.IsNotNull())
                {
                    _database.Dispose();
                }

                _database = new ReferenceServer();
                _database.BeginTransaction();
            }

            return(_database);
        }