File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,28 @@ public async Task PagedProductsWithOuterWhereClauseAsync()
260
260
Assert . That ( ids , Is . EqualTo ( inMemoryIds ) ) ;
261
261
}
262
262
263
+ [ Test ]
264
+ public async Task PagedProductsWithOuterWhereClause2Async ( )
265
+ {
266
+ if ( Dialect is MySQLDialect )
267
+ Assert . Ignore ( "MySQL does not support LIMIT in subqueries." ) ;
268
+
269
+ //NH-2588
270
+ var inMemoryIds = ( await ( db . Products . ToListAsync ( ) ) )
271
+ . OrderBy ( x => x . UnitPrice ) . ThenBy ( x => x . ProductId )
272
+ . Skip ( 10 ) . Take ( 20 )
273
+ . Where ( x => x . UnitsInStock > 0 )
274
+ . ToList ( ) ;
275
+
276
+ var ids = await ( db . Products
277
+ . OrderBy ( x => x . UnitPrice ) . ThenBy ( x => x . ProductId )
278
+ . Skip ( 10 ) . Take ( 20 )
279
+ . Where ( x => x . UnitsInStock > 0 )
280
+ . ToListAsync ( ) ) ;
281
+
282
+ Assert . That ( ids , Is . EqualTo ( inMemoryIds ) ) ;
283
+ }
284
+
263
285
[ Test ]
264
286
public async Task PagedProductsWithOuterWhereClauseResortAsync ( )
265
287
{
Original file line number Diff line number Diff line change @@ -386,6 +386,28 @@ public void PagedProductsWithOuterWhereClause()
386
386
Assert . That ( ids , Is . EqualTo ( inMemoryIds ) ) ;
387
387
}
388
388
389
+ [ Test ]
390
+ public void PagedProductsWithOuterWhereClause2 ( )
391
+ {
392
+ if ( Dialect is MySQLDialect )
393
+ Assert . Ignore ( "MySQL does not support LIMIT in subqueries." ) ;
394
+
395
+ //NH-2588
396
+ var inMemoryIds = db . Products . ToList ( )
397
+ . OrderBy ( x => x . UnitPrice ) . ThenBy ( x => x . ProductId )
398
+ . Skip ( 10 ) . Take ( 20 )
399
+ . Where ( x => x . UnitsInStock > 0 )
400
+ . ToList ( ) ;
401
+
402
+ var ids = db . Products
403
+ . OrderBy ( x => x . UnitPrice ) . ThenBy ( x => x . ProductId )
404
+ . Skip ( 10 ) . Take ( 20 )
405
+ . Where ( x => x . UnitsInStock > 0 )
406
+ . ToList ( ) ;
407
+
408
+ Assert . That ( ids , Is . EqualTo ( inMemoryIds ) ) ;
409
+ }
410
+
389
411
[ Test ]
390
412
public void PagedProductsWithOuterWhereClauseResort ( )
391
413
{
You can’t perform that action at this time.
0 commit comments