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