getForEntity<E extends Object> static method
Gets the repository that manages entities of type E.
Implementation
static BaseRepository<E, dynamic> getForEntity<E extends Object>() {
final repo = _repositoriesByEntity[E];
if (repo == null) {
throw Exception('No repository registered for entity type $E.');
}
return repo as BaseRepository<E, dynamic>;
}