Page 1 of 1

LINQ select doesn't return everything

Posted: Fri 21 May 2010 07:06
by Zoran
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.

Posted: Wed 26 May 2010 12:12
by AndreyR
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").