I have a requirement where I need to fetch the entire data collection Users
from RavenDB and compare the retrieved result set with another set of data. There are cl
I honestly prefer the following function:
public IEnumerable GetAll()
{
List list = new List();
RavenQueryStatistics statistics = new RavenQueryStatistics();
list.AddRange(_session.Query().Statistics(out statistics));
if (statistics.TotalResults > 128)
{
int toTake = statistics.TotalResults - 128;
int taken = 128;
while (toTake > 0)
{
list.AddRange(_session.Query().Skip(taken).Take(toTake > 1024 ? 1024 : toTake));
toTake -= 1024;
taken += 1024;
}
}
return list;
}
[]'s