First LINQ statement in a program returns no more than 100
Posted: Thu 11 Feb 2010 14:26
Hi,
After having acquired the professional edition last month, we have been deploying it throughout our production application (we're not entirely newbies, so to say).
The very first LINQ to PostgreSQL statement in our program returns at most 100 entities.
We did a very short console program, which opens a connection to the database (PgSqlConnection), an then does the following:
Now, while the first WriteLine tells us that we have 114 entities, the foreach iteration only goes over the first 100.
We've tried using IEnumerable or List (using the ToList() method) and the same thing happens.
We get a 100 items list, instead of 114.
We've tried things on the PostgreSQL side (like vacuuming...), but there is no other method of querying the database that gives us this results.
We've used PgSqlMonitor and the statement sent has nothing wrong (it couldn't be simpler). The orderby clause is also not the culprit, it was added just to debug this issue.
However, this only happens to us with two of the tables we have, which currently have 106 and 114 entities respectively.
Please help!
Miguel
After having acquired the professional edition last month, we have been deploying it throughout our production application (we're not entirely newbies, so to say).
The very first LINQ to PostgreSQL statement in our program returns at most 100 entities.
We did a very short console program, which opens a connection to the database (PgSqlConnection), an then does the following:
Code: Select all
using (MyDataContext ctxt = new MyDataContext(conn))
{
IQueryable entities =
from e in ctxt.MyEntities
orderby e.IdEntity
select e;
Console.WriteLine("{0} entities.", entities.Count());
int i = 0;
foreach (MyEntity e in entities)
{
Console.WriteLine("{0} - {1}", i++, e.IdEntity);
}
}
We've tried using IEnumerable or List (using the ToList() method) and the same thing happens.
We get a 100 items list, instead of 114.
We've tried things on the PostgreSQL side (like vacuuming...), but there is no other method of querying the database that gives us this results.
We've used PgSqlMonitor and the statement sent has nothing wrong (it couldn't be simpler). The orderby clause is also not the culprit, it was added just to debug this issue.
However, this only happens to us with two of the tables we have, which currently have 106 and 114 entities respectively.
Please help!
Miguel