1
Vote

db4o.GenericRepository.GetQuery() resolves all records

description

The following code implicitly casts IDb4oLinqQuery<T> to IEnumerable<T>, losing the db4o query capabilities. All objects will be resolved into memory when the enumerable is used, so no querying is being done.
I don't think it's easy to expose IDb4oLinqQuery as IQueryable; if it was simple, the db4o library would have made it available.
 
in KandaAlpha.Infrastructure.Repository.db4o.GenericRepository.GetQuery():
 
var query = from T c in _objectContainerManager.ObjectContainer select c;
return query.AsQueryable();

comments