public void Dispose() { using (DataServer database = new ReferenceServer()) { database.Dispose(); // Should be ok to dispose an already disposed database. database.Dispose(); } }
private ReferenceServer GetDatabase(Boolean refresh = false) { if (_database.IsNull() || refresh) { if (_database.IsNotNull()) { _database.Dispose(); } _database = new ReferenceServer(); _database.BeginTransaction(); } return(_database); }