dart_mock/lib/business.dart

15 lines
320 B
Dart
Raw Permalink Normal View History

2023-02-13 11:42:22 +01:00
import 'person.dart';
import 'person_data_access_map.dart';
class Business {
final PersonDataAccessMap _backend;
Business(this._backend);
void addPerson(Person p) => _backend.store(p);
bool existsPersonId(int id) => _backend.retrieve(id) != null;
List<Person> getAllPersons() => _backend.retrieveAll();
}