LINQ select doesn't return everything

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

LINQ select doesn't return everything

Post by Zoran » Fri 21 May 2010 07:06

The following loop will break after max(NumberOfRows, 100) iterations although it should finish after NumberOfRows (Item's number of rows) times:
foreach (var q in new DevartDataContext(ctx).GetTable().Select(x => x))
Item item = Item.create(ctx, q.Key);
I use version 4.90.124 and am almost sure that in version 4.55 the loop finished correctly using the same code.
The statement in the loop body is a database read using the same connection. It needn't be in relation with the iteration table.

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 26 May 2010 12:12

Could you please watch the query sent to server (using the DataContext.Log property)?

Code: Select all

StringBuilder sb = new StringBuilder();
ctx.Log = new System.IO.StringWriter(sb);
//...obtaining records
string log = sb.ToString();
Please post the generated query here or send it to support * devart * com (subject "LINQ: PostgreSQL 100 records").

Post Reply