getEntityRepository<O extends Object> method
Implementation
EntityRepository<O>? getEntityRepository<O extends Object>({
O? obj,
Type? type,
String? name,
}) {
if (isClosed) return null;
if (_callingGetEntityRepository) return null;
_callingGetEntityRepository = true;
checkInitialized();
try {
var entityRepository = _getEntityRepositoryImpl<O>(
obj: obj,
type: type,
name: name,
);
if (entityRepository != null) {
return entityRepository;
}
if (!identical(this, _globalProvider)) {
return _globalProvider._getEntityRepositoryImpl<O>(
obj: obj,
type: type,
name: name,
);
}
return null;
} finally {
_callingGetEntityRepository = false;
}
}