Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:04:55+00:00 2026-06-04T00:04:55+00:00

I know the fact that I can’t get more than 128 records by one

  • 0

I know the fact that I can’t get more than 128 records by one query and that this can be extended to 1024 if I use .Take(1024) but I have a new problem with this Code on the sample Database:

var albumCount = session.Query<Album>().Count();
Console.WriteLine(albumCount);          // 246 as expected?!?

var somemoredata = session.Query<Album>();
Console.WriteLine(somemoredata.Count());    // 246 but it sould be 128
int cnt = 1;
foreach (var album in somemoredata)
{
   Console.WriteLine(cnt++.ToString() + " " + album.Id);  // repeats 128 counts
}

How can this be? The Count of somemoredata is 246, but the foreach writes 128 Lines?!?

Where is the error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:04:56+00:00Added an answer on June 4, 2026 at 12:04 am

    Take is doing paging for you, which is part of the save by default principle. But Count should always give the actual count of the documents for that query.

    This will ensure that you can:

    1. Display an indication that the data shown is just a slice of the information. (Page 1 of X).
    2. Let you know that we need to do paging, when you need to.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know how to get round the fact that you can't tab through styles
One of the pitfalls in Oracle is the fact that sometimes you can select
One interesting aspect of extension methods in .NET is the fact that you can
I have a System that can have one or more Models. I have modeled
I know for a matter of fact that Type cannot be used when passing
Ok I know this is simple, in fact damn simple, I did this in
I know that this sort of question has been asked here before, but still
Does somebody know a quick and easy explode() like function that can ignore splitter
I have a question that is more in the realm of design, than implementation.
I know perfectly well that Python can handle unicode strings. But I want the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.